Skip to content

Commit

Permalink
Add proper and full dependency list and checks to installer script
Browse files Browse the repository at this point in the history
  • Loading branch information
filiptibell committed Aug 10, 2024
1 parent 915c80d commit 2b76578
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,22 @@ REPOSITORY="rojo-rbx/rokit"

set -eo pipefail

# Make sure we have prerequisites installed: curl + unzip
if ! command -v curl >/dev/null 2>&1; then
echo "ERROR: 'curl' is not installed." >&2
exit 1
fi
# Make sure we have all the necessary commands available
dependencies=(
curl
unzip
uname
tr
awk
grep
)

if ! command -v unzip >/dev/null 2>&1; then
echo "ERROR: 'unzip' is not installed." >&2
exit 1
fi
for dep in "${dependencies[@]}"; do
if ! command -v "$dep" >/dev/null 2>&1; then
echo "ERROR: '$dep' is not installed or available." >&2
exit 1
fi
done

# Warn the user if they are not using a shell we know works (bash, zsh)
if [ -z "$BASH_VERSION" ] && [ -z "$ZSH_VERSION" ]; then
Expand Down

0 comments on commit 2b76578

Please sign in to comment.