Skip to content

Instantly share code, notes, and snippets.

@COLABORATI
Created October 4, 2015 20:41
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 COLABORATI/40ee0a32a53aaa59b014 to your computer and use it in GitHub Desktop.
Save COLABORATI/40ee0a32a53aaa59b014 to your computer and use it in GitHub Desktop.
setup wpjoints.com theme and change bower_components path to com
#!/bin/bash
# setup the jointswp.com zurb foundation wordpress theme
echo 'This script will: '
echo '* git clone the jointswp.com wordpress theme into a given directory'
echo '* checkout into a new branch called dev-local'
echo '* replace the default bower_components directory with "com"'
echo 'Use this command in your wordpress theme directory - no checks !!!'
if [ -z "$1" ]
then
echo "No first argument supplied! Please add the name of the directory to be created!"
exit 1
fi
git clone https://github.com/JeremyEnglert/JointsWP.git $1
cd $1
git checkout -b dev-local
echo '{' > .bowerrc
echo ' "directory" : "com" ' >> .bowerrc
echo '}' >> .bowerrc
# change all occurances of bower_components to com in these files:
# gulpfile.js
# assets/functions/enqueue-scripts.php
# assets/scss/_gallery.scss
# assets/scss/_settings.scss
# assets/scss/style.scss
sed -i 's/bower_components/com/g' gulpfile.js assets/functions/enqueue-scripts.php assets/scss/_gallery.scss assets/scss/_settings.scss assets/scss/style.scss
git rm -r bower_components
printf "\ncom/" >> .gitignore
git add .bowerrc
git commit -am 'changed "bower_components" to "com"'
bower update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment