run, start changing script to handle Artix/Arch.

This commit is contained in:
me
2026-09-28 15:45:01 -07:00
parent 30da06e1fe
commit 810ff3ce36
+23 -9
View File
@@ -80,28 +80,42 @@ fi
log "Check if any system dependencies need installed." log "Check if any system dependencies need installed."
progs="" progs=""
if [[ ! `which php` ]]; then if [[ ! `which php 2>/dev/null` ]]; then
echo "- Installing PHP" echo "- Installing PHP"
progs="$progs php-cli" progs_apt="$progs_apt php-cli"
progs_pm="$progs_pm php"
fi fi
if [[ ! `which node` ]]; then if [[ ! `which node 2>/dev/null` ]]; then
echo "- Installing Node" echo "- Installing Node"
progs="$progs nodejs" progs="$progs nodejs"
fi fi
if [[ ! `which npm` ]]; then if [[ ! `which npm 2>/dev/null` ]]; then
echo "- Installing NPM" echo "- Installing NPM"
progs="$progs npm" progs_apt="$progs_apt npm"
progs_pm="$progs_pm " # comes with Node.js
fi fi
if [[ ! `which curl` ]]; then if [[ ! `which curl 2>/dev/null` ]]; then
echo "- Installing Curl" echo "- Installing Curl"
progs="$progs curl" progs="$progs curl"
fi fi
if [[ ! `which ps` ]]; then if [[ ! `which ps 2>/dev/null` ]]; then
echo "- Installing PS" echo "- Installing PS"
progs="$progs procps" progs_apt="$progs_apt procps"
progs_pm="$progs_pm procps-ng"
fi fi
if [[ -n "$progs" ]]; then if [[ -n "$progs" ]]; then
$sudo apt-get install -y $progs if [[ `which apt 2>/dev/null` ]]; then
echo "Using APT..."
progs="$progs $progs_apt"
$sudo apt-get install -y $progs
elif [[ `which pacman 2>/dev/null` ]]; then
echo "Using pacman..."
progs="$progs $progs_pm"
$sudo pacman -Sy --noconfirm $progs
else
echo "ERROR: Please install these programs then try again: $progs"
exit 1
fi
fi fi
# Directories and allowed page types are executable, others are not. # Directories and allowed page types are executable, others are not.