fix curl exiting with non-zero status
This commit is contained in:
parent
0b5a427902
commit
cc61e9cc1f
@ -84,14 +84,14 @@ mkheader() {
|
|||||||
cd ${2}
|
cd ${2}
|
||||||
case ${3} in
|
case ${3} in
|
||||||
"C")
|
"C")
|
||||||
curl ${ROOT_URL}/template.c -o ${2}/src/template.c
|
curl ${ROOT_URL}/template.c -o ${2}/src
|
||||||
if [ "$?" != 0 ]; then
|
if [ "$?" != 0 ]; then
|
||||||
printf "${red}[x]${reset} Curl exited with non-zero status.\n"
|
printf "${red}[x]${reset} Curl exited with non-zero status.\n"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"Bash")
|
"Bash")
|
||||||
curl ${ROOT_URL}/template.sh -o ${2}/src/template.sh
|
curl ${ROOT_URL}/template.sh -o ${2}/src
|
||||||
if [ "$?" != 0 ]; then
|
if [ "$?" != 0 ]; then
|
||||||
printf "${red}[x]${reset} Curl exited with non-zero status.\n"
|
printf "${red}[x]${reset} Curl exited with non-zero status.\n"
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user