Demand exactly 1 argument
parent
7f39930c56
commit
4f39f4a471
|
@ -4,14 +4,14 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# check if unprivileged
|
# check if unprivileged
|
||||||
if [ $(id -u) -eq 0]
|
if [ $(id -u) -eq 0 ]
|
||||||
then
|
then
|
||||||
echo "Please do not run this script as root."
|
echo "Please do not run this script as root."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# check file permissions
|
# check file permissions
|
||||||
if [[ -w ~/wp-content/plugins ]]
|
if [ -w ~/wp-content/plugins ]
|
||||||
then
|
then
|
||||||
echo "Missing file permissions. To fix this, run this command as root:"
|
echo "Missing file permissions. To fix this, run this command as root:"
|
||||||
echo " chown $USER /home/$USER/wp-content/plugins -R"
|
echo " chown $USER /home/$USER/wp-content/plugins -R"
|
||||||
|
@ -19,7 +19,7 @@ if [[ -w ~/wp-content/plugins ]]
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# we need at least one argument
|
# we need at least one argument
|
||||||
if [ $# -eq 0 ]
|
if [ ! $# -eq 1 ]
|
||||||
then
|
then
|
||||||
echo "usage: ./update-app.sh \$app"
|
echo "usage: ./update-app.sh \$app"
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in New Issue