Skip to content
This repository has been archived by the owner on May 12, 2019. It is now read-only.

Commit

Permalink
Added build script to create archive for usage with Ghost(pro).
Browse files Browse the repository at this point in the history
  • Loading branch information
devillecodes committed Dec 31, 2015
1 parent 62bf4d2 commit bb67bc5
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions scripts/build.sh
@@ -0,0 +1,28 @@
#!/bin/bash

# This script creates an archive of the theme files to be used with Ghost(Pro).
# Note: Be sure to first run 'Gulp build' before executing this script, to ensure everything is compiled and minified for production.

FILES="*.hbs *.md *.html partials/ assets/js/uno-zen.js assets/css/uno-zen.css assets/fonts/ assets/img/"
OUTPUT="uno-zen"

if [ $# -eq 0 ]; then
printf "\nNo argument supplied, using default as archive name.\n\n"
else
printf "\nArgument supplied, using that as archive name.\n\n"
OUTPUT=$1
fi

printf "Using $OUTPUT as archive name.\n\n"

if [ -f "$OUTPUT.zip" ]; then
printf "Output file $OUTPUT.zip already exists, removing old version.\n\n"
rm $OUTPUT.zip
printf "Old version removed.\n\n"
fi

printf "Creating archive.\n\n"

zip -r $OUTPUT $FILES

printf "\nDone!\n\n"

0 comments on commit bb67bc5

Please sign in to comment.