wordpress/update-app.sh

25 lines
324 B
Bash
Executable File

#!/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