Created
April 13, 2016 09:49
-
-
Save bradonomics/8a0bcf1f8d40785254edae60bdd13868 to your computer and use it in GitHub Desktop.
Installation script for Genesis Boilerplate (or how to start a Genesis child theme). See bradonomics.com/genesis-boilerplate/ for instructions.
This file contains 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 | |
# Download boilerplate files | |
wget https://github.com/bradonomics/genesis-boilerplate/archive/master.tar.gz | |
# Unzip | |
tar zxf master.tar.gz | |
cd genesis-boilerplate-master | |
cp -rpf * ../ | |
cp -rpf .[^.]* ../ # moves .gitignore | |
cd ../ | |
rm -rf genesis-boilerplate-master/ | |
rm -f master.tar.gz | |
# Download latest normalize CSS file, rename it, and move it into dev/scss directory | |
wget https://raw.githubusercontent.com/necolas/normalize.css/master/normalize.css | |
mv -f normalize.css dev/scss/_normalize.scss | |
# Install gulp | |
npm init | |
npm install --save-dev gulp gulp-sass gulp-autoprefixer gulp-cssnano gulp-concat gulp-uglify gulp-rename browser-sync | |
# Prompt for projectName and update gulpfile.js file | |
echo "You will need to add your theme directory name to your gulp file." | |
echo "This will be the directory where your child theme lives." | |
echo "For example, if you are building this child theme in /var/www/html/wordpress/wp-content/themes/genesis-boilerplate/ you'd need to enter \"wordpress\" in the prompt." | |
echo "If you are building it in /var/www/html/wp-content/themes/genesis-boilerplate/, meaning WordPress is installed directally in the html directory, you should leave the directory blank at the prompt" | |
read -e -p "What is the name of your theme directory: " PROJECTNAME | |
sed -i "s/geneplate/${PROJECTNAME}/g" "gulpfile.js" | |
# Delete install script | |
rm install.sh | |
# Output note about installing git | |
echo "Everything should now be setup and ready for you to start your new Genesis child theme. You'll probably want to setup git before you start working. To do so, setup a new repository at GitHub, BitBucket, or elsewhere, then run 'git init' in this directory. You'll then need to add your orign. This link can help: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment