This repository has been archived by the owner on May 12, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 281
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added build script to create archive for usage with Ghost(pro).
- Loading branch information
1 parent
62bf4d2
commit bb67bc5
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |