Skip to content

Instantly share code, notes, and snippets.

@simonwo
Created May 10, 2014 00:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simonwo/d909b7cf3e3c331be43f to your computer and use it in GitHub Desktop.
Save simonwo/d909b7cf3e3c331be43f to your computer and use it in GitHub Desktop.
Scripts for auto installing Wordpress plugins. Warning: they're shitty
#!/bin/sh
# Usage:
# $ cd themes/your-theme/
# $ sh ./install-plugins.sh plugins.list
wget -i $1
mv *.zip ../../plugins
cd ../../plugins
ls | xargs -n 1 unzip
rm *.zip
#!/bin/sh
# Usage:
# $ cd themes/your-theme/
# $ sh ./list-plugins.sh > plugins.list
grep -rne '^\s*Version:' ../../plugins/ |
awk -F: '{print $1 "/" $4 }' |
awk -F'/' '{printf "http://downloads.wordpress.org/plugin/" $2 "."; printf $(NF) "|"}' |
tr -d [:space:]| tr '|' '\n' |
awk '{print $0 ".zip"}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment