Skip to content

Instantly share code, notes, and snippets.

@Balamir
Created July 4, 2017 09:43
Show Gist options
  • Save Balamir/0627caf0cf589165fff97c5fea6c6edc to your computer and use it in GitHub Desktop.
Save Balamir/0627caf0cf589165fff97c5fea6c6edc to your computer and use it in GitHub Desktop.
while true; do
read -p "Remove the themes folder (deletes all themes) and create a new one? [y/n] " yn
case $yn in
[Yy]* ) rm -rf themes/; mkdir themes/; break;;
[Nn]* ) break;;
* ) echo "Please answer yes or no.";;
esac
done
while true; do
read -p "Download all of WooThemes Themes from the Github repository? [y/n] " yn
case $yn in
[Yy]* ) git clone [email protected]:woothemes/all-themes.git themes; break;;
[Nn]* ) break;;
* ) echo "Please answer yes or no.";;
esac
done
while true; do
read -p "Download Storefront version 1.3.1? [y/n] " yn
case $yn in
[Yy]* ) svn co https://themes.svn.wordpress.org/storefront/1.3.1 themes/storefront; break;;
[Nn]* ) break;;
* ) echo "Please answer yes or no.";;
esac
done
while true; do
read -p "Remove the plugins folder (deletes all plugins) and create a new one? [y/n] " yn
case $yn in
[Yy]* ) rm -rf plugins/; rm -rf woocommerce-products/; mkdir plugins/; break;;
[Nn]* ) break;;
* ) echo "Please answer yes or no.";;
esac
done
while true; do
read -p "Download all WooCommerce extensions and latest WooCommerce plugin? " yn
case $yn in
[Yy]* ) svn co https://woothemes.svn.beanstalkapp.com/woocommerce-products/; svn co http://plugins.svn.wordpress.org/woocommerce/trunk plugins/woocommerce; break;;
[Nn]* ) break;;
* ) echo "Please answer yes or no.";;
esac
done
while true; do
read -p "Exact and install all WooCommerce extensions?" yn
case $yn in
[Yy]* ) find woocommerce-products/trunk/product-packages/ -type f -name '*.zip' -print0 | while read -d $'\0' file;
do
# skip loop iteration if file no longer exists
if [[ ! -f "$file" ]] ; then continue; fi
echo "Unzipping $file ..."
unzip $file -d plugins/
done
break;;
[Nn]* ) break;;
* ) echo "Please answer yes or no.";;
esac
done
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment