#!/bin/bash
-# change to the home directory so we can find our files.
-cd
+source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
TEMPO_FILE="$(mktemp "$TMP/zz_feistypack.XXXXXX")"
# specify where we keep the file until we're ready to move it.
# shortcut for the lengthy exclude parameter.
+# note that this only works on file patterns apparently, like *.hosed,
+# instead of working with general patterns (like */code_guide/*).
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_APEX")"
+base_dir="$(basename "$FEISTY_MEOW_APEX")"
-date_string="$(date +"%Y_%b_%e_%H%M" | sed -e 's/ //g')"
+pushd $parent_dir
+
+# archive feisty meow current state, but exclude the file names we never want
+# to see in the archive. the exclude vcs flag takes care of excluding
+# revision control system private dirs. first chunk of excludes is for the
+# code guide files; this should wash out the majority of those fat things.
+# next line is to exclude archives that shouldn't be in the output file.
+tar -h -cz --exclude-vcs -f $TEMPO_FILE $base_dir \
+\
+ ${XC}*8cpp_source.html ${XC}*8h__dep__incl.map ${XC}*8h__dep__incl.md5 ${XC}*8h__dep__incl.png ${XC}*8h.html \
+ ${XC}*8h__incl.png ${XC}*8h_source.html ${XC}8h__dep__incl.md5 ${XC}8cpp.js \
+\
+ ${XC}*.tar.gz ${XC}*.zip \
+
+# note: not currently excluded! cannot do these with --exclude= flag!
+#${XC}*/waste/* ${XC}*/logs/* ${XC}*/binaries/* ${XC}*/kona/bin/*
# 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 $WEBBED_SITES/feistymeow.org/releases/feisty_meow_codebase_$(date_stringer).tar.gz
+
+popd
+