From: Chris Koeritz Date: Sat, 14 Apr 2012 16:36:22 +0000 (-0400) Subject: fixed packing script to ignore more .git stuff and to be in the right place X-Git-Tag: 2.140.90~1425 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=da3c5dd10227906552c0ac53259628913bc369d5;p=feisty_meow.git fixed packing script to ignore more .git stuff and to be in the right place to make the archive. --- diff --git a/scripts/archival/pack_feisty_meow.sh b/scripts/archival/pack_feisty_meow.sh index d58ff5d0..c61ee520 100644 --- a/scripts/archival/pack_feisty_meow.sh +++ b/scripts/archival/pack_feisty_meow.sh @@ -1,7 +1,6 @@ #!/bin/bash -# change to the home directory so we can find our files. -cd +source $FEISTY_MEOW_SCRIPTS/core/functions.sh TEMPO_FILE="$(mktemp "$TMP/zz_feistypack.XXXXXX")" # specify where we keep the file until we're ready to move it. @@ -9,12 +8,18 @@ TEMPO_FILE="$(mktemp "$TMP/zz_feistypack.XXXXXX")" # shortcut for the lengthy exclude parameter. export XC='--exclude=' -# zip up hoople2, but exclude the file names we never want to see. -tar -czf $TEMPO_FILE feisty_meow $XC"*/*.tar.gz" $XC"*/*.zip" $XC"*/waste/*" $XC"*/logs/*" $XC"*/binaries/*" $XC"*/.git/*" +parent_dir="$(dirname "$FEISTY_MEOW_DIR")" +base_dir="$(basename "$FEISTY_MEOW_DIR")" + +pushd $parent_dir -date_string="$(date +"%Y_%b_%e_%H%M" | sed -e 's/ //g')" +# zip up hoople2, but exclude the file names we never want to see. +tar -czf $TEMPO_FILE $base_dir $XC"*/*.tar.gz" $XC"*/*.zip" $XC"*/waste/*" $XC"*/logs/*" $XC"*/binaries/*" $XC"*.git*" # now move the newest version into its resting place. this prepares the # feisty_meow package for uploading. -mv -v $TEMPO_FILE $WEB_DIR/feistymeow.org/releases/feisty_meow_codebase_${date_string}.tar.gz +mv -v $TEMPO_FILE $WEB_DIR/feistymeow.org/releases/feisty_meow_codebase_$(date_stringer).tar.gz + +popd +