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}
case ${3} in
"C")
curl ${ROOT_URL}/template.c -o ${2}/src/template.c
curl ${ROOT_URL}/template.c -o ${2}/src
if [ "$?" != 0 ]; then
printf "${red}[x]${reset} Curl exited with non-zero status.\n"
exit 1
fi
;;
"Bash")
curl ${ROOT_URL}/template.sh -o ${2}/src/template.sh
curl ${ROOT_URL}/template.sh -o ${2}/src
if [ "$?" != 0 ]; then
printf "${red}[x]${reset} Curl exited with non-zero status.\n"
exit 1