4e6466009610070616f67993d981600099148de6
[feisty_meow.git] / scripts / archival / pack_feisty_meow.sh
1 #!/bin/bash
2
3 source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
4
5 # location where we intend to store these packages.
6 RELEASE_PATH="$WEBBED_SITES/feistymeow.org/releases"
7
8 # check that we can see the release path.
9 if [ ! -d "$RELEASE_PATH" ]; then
10   echo "The release path does not exist: $RELEASE_PATH"
11   exit 1
12 fi
13
14 TEMPO_FILE="$(mktemp "$TMP/zz_feistypack.XXXXXX")"
15   # specify where we keep the file until we're ready to move it.
16
17 log_feisty_meow_event "packing feisty meow in temporary file $TEMPO_FILE"
18
19 # shortcut for the lengthy exclude parameter.
20 # note that this only works on file patterns apparently, like *.hosed,
21 # instead of working with general patterns (like */code_guide/*).
22 export XC='--exclude='
23
24 parent_dir="$(dirname "$FEISTY_MEOW_APEX")"
25 base_dir="$(basename "$FEISTY_MEOW_APEX")"
26
27 pushd $parent_dir
28
29 # archive feisty meow current state, but exclude the file names we never want
30 # to see in the archive.  the exclude vcs flag takes care of excluding
31 # revision control system private dirs.  first chunk of excludes is for the
32 # code guide files; this should wash out the majority of those fat things.
33 # next line is to exclude archives that shouldn't be in the output file.
34 tar -h -cz --exclude-vcs -f $TEMPO_FILE \
35 \
36   ${XC}*incl.map ${XC}*incl.md5 ${XC}*incl.png \
37   ${XC}*8h.html ${XC}*8c.html ${XC}*8cpp.html ${XC}*8*source.html \
38   ${XC}class*html ${XC}class*js ${XC}class*members.html \
39   ${XC}struct*html ${XC}struct*js ${XC}struct*members.html \
40   ${XC}globals*html ${XC}functions*html \
41   ${XC}navtree*js ${XC}inherit_graph_* \
42   ${XC}namespace*js ${XC}namespace*html \
43   ${XC}dir_*html ${XC}dir_*map ${XC}dir_*md5 ${XC}dir_*png ${XC}dir_*js \
44   ${XC}*8cpp.js ${XC}*8h.js \
45   ${XC}*graph.map ${XC}*graph.md5 ${XC}*graph.png \
46 \
47   ${XC}*.tar.gz ${XC}*.zip \
48 \
49 $base_dir 
50
51 # note: not currently excluded!  cannot do these with --exclude= flag!
52 #${XC}*/waste/* ${XC}*/logs/* ${XC}*/binaries/* ${XC}*/kona/bin/*
53
54 # now move the newest version into its resting place.  this prepares the
55 # feisty_meow package for uploading.
56 mv -v $TEMPO_FILE "$RELEASE_PATH/feisty_meow_codebase_$(date_stringer).tar.gz"
57
58 popd
59
60