update script to handle error in installation

This commit is contained in:
2025-12-19 21:13:28 -06:00
parent ccbb6d290e
commit e526072a88

View File

@@ -12,13 +12,25 @@ data:
if ! command -v curl 2>&1 >/dev/null
then
echo "curl could not be found, installing";
apk add curl;
apk add --no-cache curl;
if [ $? -eq 0 ]; then
echo ">> Installation successful"
else
echo ">> Installation failed with exit code $?"
exit 1
fi
fi;
if ! command -v jq 2>&1 >/dev/null
then
echo "jq could not be found, installing";
apk add jq;
apk add --no-cache jq;
if [ $? -eq 0 ]; then
echo ">> Installation successful"
else
echo ">> Installation failed with exit code $?"
exit 1
fi
fi;
API_ENDPOINT="http://localhost:8080/api/v2";