wordpress/update-app.sh

25 lines
324 B
Bash
Raw Normal View History

2021-06-14 09:04:31 +00:00
#!/bin/sh
2021-06-14 09:07:30 +00:00
# fail script if one command fails
set -e
# we need at least one argument
2021-06-14 09:04:31 +00:00
if [ $# -eq 0 ]
then
echo "usage: ./update-app.sh \$app"
exit 0
fi
APP=$1
2021-06-14 09:07:30 +00:00
# download app
2021-06-14 09:04:31 +00:00
cd ~/wp-content/plugins
wget https://downloads.wordpress.org/plugin/$APP.zip
2021-06-14 09:07:30 +00:00
# install app
2021-06-14 09:04:31 +00:00
rm -rf $APP
unzip $APP.zip
2021-06-14 09:07:30 +00:00
# clean up
rm $APP.zip