You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
411 B
12 lines
411 B
7 years ago
|
#!/usr/bin/sh
|
||
7 years ago
|
if [ -n "$1" ]; then
|
||
|
plugin=$(wp plugin list 2> /dev/null | grep available | grep $1 | head -n 1 | awk '{print $1}')
|
||
|
else
|
||
|
plugin=$(wp plugin list 2> /dev/null | grep available | head -n 1 | awk '{print $1}')
|
||
|
fi
|
||
7 years ago
|
echo "$plugin"
|
||
|
versions=$(wp plugin update $plugin 2> /dev/null | tail -n 2 | head -n 1 | awk '{print $2 "->" $3}')
|
||
|
echo "$versions"
|
||
|
git add .
|
||
7 years ago
|
git commit -m "Update $plugin $versions"
|