mirror of
https://github.com/netbox-community/netbox-docker.git
synced 2024-11-07 00:24:03 +01:00
Added check for commands to all scripts
This commit is contained in:
parent
4bad061bc4
commit
4ce89f9209
9
build-functions/check-commands.sh
Normal file
9
build-functions/check-commands.sh
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
NEEDED_COMMANDS="curl jq docker skopeo"
|
||||
for c in $NEEDED_COMMANDS; do
|
||||
if ! command -v "$c" &>/dev/null; then
|
||||
echo "⚠️ '$c' is not installed. Can't proceed with build."
|
||||
exit 1
|
||||
fi
|
||||
done
|
@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
# Builds the latest released version
|
||||
|
||||
# Check if we have everything needed for the build
|
||||
source ./build-functions/check-commands.sh
|
||||
|
||||
source ./build-functions/gh-functions.sh
|
||||
|
||||
echo "▶️ $0 $*"
|
||||
|
9
build.sh
9
build.sh
@ -137,13 +137,8 @@ END_OF_HELP
|
||||
fi
|
||||
fi
|
||||
|
||||
NEEDED_COMMANDS="curl jq docker skopeo"
|
||||
for c in $NEEDED_COMMANDS; do
|
||||
if ! command -v "$c" &>/dev/null; then
|
||||
echo "⚠️ '$c' is not installed. Can't proceed with build."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
# Check if we have everything needed for the build
|
||||
source ./build-functions/check-commands.sh
|
||||
|
||||
source ./build-functions/gh-functions.sh
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user