setup.sh: fix — curl prerequisite check, exits with install instructions if missing

This commit is contained in:
Ada
2026-04-06 10:23:09 -04:00
parent 713cc1ed0f
commit fd16032a91

View File

@@ -22,11 +22,16 @@ if ! command -v apt-get &> /dev/null; then
exit 1
fi
# Ensure curl is available (not installed on minimal Debian)
# Require curl as a prerequisite (needed to download the script itself)
if ! command -v curl &> /dev/null; then
echo "Installing curl..."
apt-get update -qq
apt-get install -y -qq curl > /dev/null 2>&1
echo "ERROR: curl is required but not installed."
echo ""
echo "Install it with:"
echo " apt-get install curl"
echo ""
echo "Then run this command again:"
echo " curl -sL https://gitea.ledrew.me/ledadmin/project-tracker/raw/branch/master/deploy/setup.sh | bash"
exit 1
fi
# Check for Docker