update script to handle error in installation
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user