mirror of
https://github.com/buanet/ioBroker.docker.git
synced 2025-12-29 19:54:06 +02:00
correct quoting
This commit is contained in:
8
debian/scripts/setup_packages.sh
vendored
8
debian/scripts/setup_packages.sh
vendored
@@ -1,20 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ $1 == "-install" ]
|
||||
if [ "$1" == "-install" ]
|
||||
then
|
||||
apt-get -qq update
|
||||
packages=$(cat /opt/scripts/.docker_config/.packages)
|
||||
for i in $packages; do
|
||||
if [ $(dpkg-query -W -f='${Status}' $i 2>/dev/null | grep -c "ok installed") -eq 0 ];
|
||||
if [ "$(dpkg-query -W -f='${Status}' "$i" 2>/dev/null | grep -c "ok installed")" -eq 0 ];
|
||||
then
|
||||
echo "$i is not installed. Installing..."
|
||||
sudo apt-get -qq -y install $i
|
||||
sudo apt-get -qq -y install "$i"
|
||||
echo "Done."
|
||||
else
|
||||
echo "$i is already installed."
|
||||
fi
|
||||
done
|
||||
elif [ $1 == "-update" ]
|
||||
elif [ "$1" == "-update" ]
|
||||
then
|
||||
apt-get -qq update
|
||||
apt-get -qq -y upgrade
|
||||
|
||||
Reference in New Issue
Block a user