From 7d044ea0a2afe425cac9eeb45b721dbb1b6448a7 Mon Sep 17 00:00:00 2001 From: "0x90.space" Date: Thu, 7 Dec 2023 21:55:15 +0000 Subject: [PATCH] Small fixes --- update-app.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/update-app.sh b/update-app.sh index c4c6e3a..d0e65e9 100755 --- a/update-app.sh +++ b/update-app.sh @@ -1,14 +1,24 @@ #!/bin/sh + +# fail script if one command fails +set -e + +# we need at least one argument if [ $# -eq 0 ] then echo "usage: ./update-app.sh \$app" exit 0 fi - APP=$1 +# download app cd ~/wp-content/plugins wget https://downloads.wordpress.org/plugin/$APP.zip + +# install app rm -rf $APP unzip $APP.zip +# clean up +rm $APP.zip +