fix unexpected printing of usage
This commit is contained in:
parent
aa5d89e7ee
commit
912edb375e
@ -52,7 +52,7 @@ usage_small() {
|
|||||||
|
|
||||||
mkprojectdir() {
|
mkprojectdir() {
|
||||||
printf "${blue}[i]${reset} Creating project directory...\n"
|
printf "${blue}[i]${reset} Creating project directory...\n"
|
||||||
mkdir ./${2}
|
mkdir -v ./${2}
|
||||||
printf "${green}[${check}]${reset} Directory created.\n"
|
printf "${green}[${check}]${reset} Directory created.\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,11 +60,11 @@ mkskel() {
|
|||||||
printf "${blue}[i]${reset} Creating project directory skeleton...\n"
|
printf "${blue}[i]${reset} Creating project directory skeleton...\n"
|
||||||
case ${3} in
|
case ${3} in
|
||||||
"C")
|
"C")
|
||||||
mkdir ${2}/{src,include}
|
mkdir -v ${2}/{src,include}
|
||||||
;;
|
;;
|
||||||
"Bash")
|
"Bash")
|
||||||
mkdir ${2}/{src,install,man}
|
mkdir -v ${2}/{src,install,man}
|
||||||
mkdir ${2}/src/{bin,etc,man}
|
mkdir -v ${2}/src/{bin,etc,man}
|
||||||
esac
|
esac
|
||||||
printf "${green}[${check}]${reset} Project directory skeleton created.\n"
|
printf "${green}[${check}]${reset} Project directory skeleton created.\n"
|
||||||
}
|
}
|
||||||
@ -121,6 +121,7 @@ case $1 in
|
|||||||
printf "Available templates:\n"
|
printf "Available templates:\n"
|
||||||
printf "C\n"
|
printf "C\n"
|
||||||
printf "Bash/POSIX sh\n"
|
printf "Bash/POSIX sh\n"
|
||||||
|
exit 0
|
||||||
;;
|
;;
|
||||||
-*|--*)
|
-*|--*)
|
||||||
usage_small "$@"
|
usage_small "$@"
|
||||||
|
Loading…
Reference in New Issue
Block a user