Created
October 4, 2015 20:41
-
-
Save COLABORATI/40ee0a32a53aaa59b014 to your computer and use it in GitHub Desktop.
setup wpjoints.com theme and change bower_components path to com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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