forked from switnet/quick-jibri-installer
prepare_php.sh: add missing install_ifnot function
This commit is contained in:
parent
0e222b2a3e
commit
160e00edee
|
@ -18,6 +18,15 @@ if [ $# -ne 1 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
install_ifnot() {
|
||||||
|
if [ "$(dpkg-query -W -f='${Status}' "$1" 2>/dev/null | grep -c "ok installed")" == "1" ]; then
|
||||||
|
echo " $1 is installed, skipping..."
|
||||||
|
else
|
||||||
|
printf "\n---- Installing %s ----" "$1"
|
||||||
|
apt-get -yq2 install "$1"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
install_aval_package() {
|
install_aval_package() {
|
||||||
for i in $1
|
for i in $1
|
||||||
do
|
do
|
||||||
|
|
Loading…
Reference in New Issue