Only run apt install command once.
This commit is contained in:
14
run.sh
14
run.sh
@@ -79,25 +79,29 @@ if [[ $LOGNAME != "root" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
log "Check if any system dependencies need installed."
|
log "Check if any system dependencies need installed."
|
||||||
|
progs=""
|
||||||
if [[ ! `which php` ]]; then
|
if [[ ! `which php` ]]; then
|
||||||
echo "- Installing PHP"
|
echo "- Installing PHP"
|
||||||
$sudo apt-get install -y php-cli
|
progs="$progs php-cli"
|
||||||
fi
|
fi
|
||||||
if [[ ! `which node` ]]; then
|
if [[ ! `which node` ]]; then
|
||||||
echo "- Installing Node"
|
echo "- Installing Node"
|
||||||
$sudo apt-get install -y nodejs
|
progs="$progs nodejs"
|
||||||
fi
|
fi
|
||||||
if [[ ! `which npm` ]]; then
|
if [[ ! `which npm` ]]; then
|
||||||
echo "- Installing NPM"
|
echo "- Installing NPM"
|
||||||
$sudo apt-get install -y npm
|
progs="$progs npm"
|
||||||
fi
|
fi
|
||||||
if [[ ! `which curl` ]]; then
|
if [[ ! `which curl` ]]; then
|
||||||
echo "- Installing Curl"
|
echo "- Installing Curl"
|
||||||
$sudo apt-get install -y curl
|
progs="$progs curl"
|
||||||
fi
|
fi
|
||||||
if [[ ! `which ps` ]]; then
|
if [[ ! `which ps` ]]; then
|
||||||
echo "- Installing PS"
|
echo "- Installing PS"
|
||||||
$sudo apt-get install -y procps
|
progs="$progs procps"
|
||||||
|
fi
|
||||||
|
if [[ -n "$progs" ]]; then
|
||||||
|
$sudo apt-get install -y $progs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Directories and allowed page types are executable, others are not.
|
# Directories and allowed page types are executable, others are not.
|
||||||
|
Reference in New Issue
Block a user