diff options
Diffstat (limited to 'bin/archive')
-rwxr-xr-x | bin/archive | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/bin/archive b/bin/archive index 584ea13..8949268 100755 --- a/bin/archive +++ b/bin/archive @@ -9,14 +9,15 @@ DIRNAME="`dirname $0`" BASEDIR="$DIRNAME/.." #ARCHIVE="$BASEDIR/archive" ARCHIVE="archive" +ASSETS="build" REVISION="`git describe --tags 2> /dev/null || git log -1 --format=oneline | cut -d ' ' -f 1`" # Determine the revision file -if [ -e "public/revision" ]; then - #REVFILE="$BASEDIR/public/revision" - REVFILE="public/revision" +if [ -e "$ASSETS/revision" ]; then + #REVFILE="$BASEDIR/$ASSETS/revision" + REVFILE="$ASSETS/revision" else - REVFILE="public/book/revision" + REVFILE="$ASSETS/book/revision" fi # Make sure the archive folder exist @@ -41,7 +42,7 @@ if git tag | grep -q "^${OLD_REVISION}"; then # Check if archive does not exists if [ ! -d "$ARCHIVE/$OLD_REVISION" ]; then echo "# $BASENAME: archiving $OLD_REVISION..." - cp -alf compiled $ARCHIVE/$OLD_REVISION + cp -alf $ASSETS $ARCHIVE/$OLD_REVISION else echo "# $BASENAME: revision $OLD_REVISION already archived" fi |