diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2024-06-08 10:05:30 +0100 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2024-06-08 10:05:30 +0100 |
commit | 46087a2503032443d7f0613e5aeb2a5195c27850 (patch) | |
tree | 910ebd4bdc62360ed53881671a471d5ef2e2ca44 /bin/archive | |
parent | bff0778cb9751a0581ab0eb2ca97cbdca8bcca03 (diff) | |
download | bookup-46087a2503032443d7f0613e5aeb2a5195c27850.tar.gz bookup-46087a2503032443d7f0613e5aeb2a5195c27850.tar.bz2 |
Fix: misc improvements
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 |