From 4f39f4a471cde5df7c470d61b461ff70475472b8 Mon Sep 17 00:00:00 2001 From: missytake Date: Mon, 14 Jun 2021 11:20:13 +0200 Subject: [PATCH] Demand exactly 1 argument --- update-app.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/update-app.sh b/update-app.sh index 52e39df..98f3e68 100755 --- a/update-app.sh +++ b/update-app.sh @@ -4,14 +4,14 @@ set -e # check if unprivileged -if [ $(id -u) -eq 0] +if [ $(id -u) -eq 0 ] then echo "Please do not run this script as root." exit 0 fi # check file permissions -if [[ -w ~/wp-content/plugins ]] +if [ -w ~/wp-content/plugins ] then echo "Missing file permissions. To fix this, run this command as root:" echo " chown $USER /home/$USER/wp-content/plugins -R" @@ -19,7 +19,7 @@ if [[ -w ~/wp-content/plugins ]] fi # we need at least one argument -if [ $# -eq 0 ] +if [ ! $# -eq 1 ] then echo "usage: ./update-app.sh \$app" exit 0