fix curl exiting with non-zero status

This commit is contained in:
Liam Waldron 2023-11-08 09:55:21 -05:00
parent 0b5a427902
commit cc61e9cc1f

View File

@ -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