Created
April 3, 2010 19:54
-
-
Save dandean/354806 to your computer and use it in GitHub Desktop.
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 | |
| show= | |
| xport= | |
| upload= | |
| newfiles=0 | |
| while getopts 'oeu' OPTION | |
| do | |
| case $OPTION in | |
| o) show=1 | |
| ;; | |
| e) xport=1 | |
| ;; | |
| u) upload=1 | |
| ;; | |
| esac | |
| done | |
| if [ "$show" ] | |
| then | |
| echo "Opening the Fancy trunk directory." | |
| open ~/Sites/fancy/trunk | |
| echo "Opening the Fancy theme directory in TextMate." | |
| mate ~/Sites/fancy/trunk/themes/fancy | |
| fi | |
| echo "Running the Fancy build script." | |
| cd ~/Sites/fancy/trunk/themes/fancy/lib | |
| ./build | |
| if [ "$xport" ] | |
| then | |
| echo "Crunkin' it up!" | |
| cd ~/Sites/fancy/trunk/themes | |
| echo "Removing old export files!" | |
| rm ~/Sites/fancy/trunk/exports/fancy.zip | |
| rm -rf ~/Sites/fancy/trunk/exports/fancy | |
| let newfile_count=`svn status | grep "^\?" -c` | |
| if [ $newfile_count -gt 0 ] | |
| then | |
| echo "Adding new files!" | |
| svn status | |
| svn add ~/Sites/fancy/trunk/themes/fancy/* --force | |
| fi | |
| echo "Exporting Theme from SVN!" | |
| svn export ./fancy ~/Sites/fancy/trunk/exports/fancy | |
| cd ~/Sites/fancy/trunk/exports/ | |
| echo "Compressing theme!" | |
| zip -r fancy fancy | |
| open . | |
| if [ "$upload" ] | |
| then | |
| open http://fancyjewels.myshopify.com/admin/assets | |
| fi | |
| fi | |
| echo "Done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment