Small fixes
This commit is contained in:
parent
87969095f1
commit
7d044ea0a2
|
@ -1,14 +1,24 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
# fail script if one command fails
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# we need at least one argument
|
||||||
if [ $# -eq 0 ]
|
if [ $# -eq 0 ]
|
||||||
then
|
then
|
||||||
echo "usage: ./update-app.sh \$app"
|
echo "usage: ./update-app.sh \$app"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
APP=$1
|
APP=$1
|
||||||
|
|
||||||
|
# download app
|
||||||
cd ~/wp-content/plugins
|
cd ~/wp-content/plugins
|
||||||
wget https://downloads.wordpress.org/plugin/$APP.zip
|
wget https://downloads.wordpress.org/plugin/$APP.zip
|
||||||
|
|
||||||
|
# install app
|
||||||
rm -rf $APP
|
rm -rf $APP
|
||||||
unzip $APP.zip
|
unzip $APP.zip
|
||||||
|
|
||||||
|
# clean up
|
||||||
|
rm $APP.zip
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue