Created
September 26, 2014 16:48
-
-
Save joebuschmann/0598171f19d893c66a24 to your computer and use it in GitHub Desktop.
Script to zip up a modified Casper theme for uploading to a Ghost blog
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/sh | |
# Execute this script from the content/themes directory. | |
# This script copies the Casper theme in the "Casper" directory | |
# to a new directory with the new theme name. Then it creates | |
# a .zip file with the new directory's contents. | |
# New theme name. Update if you aren't Joe Buschmann :-) | |
THEME_NAME="Casper-JoeBuschmann" | |
readonly THEME_NAME | |
# Clean up old files | |
rm -rf $THEME_NAME | |
rm -f $THEME_NAME.zip | |
# Copy the modified Casper theme to a folder with the new theme name | |
cp -r casper $THEME_NAME | |
cd $THEME_NAME | |
rm .gitignore | |
rm -rf .git | |
# Update the theme name in the package config. | |
sed -i -e "s/Casper/$THEME_NAME/g" package.json | |
# Create a zip file for uploading | |
cd .. | |
zip -r $THEME_NAME.zip $THEME_NAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment