Last change
on this file was
11698,
checked in by westram, 11 years ago
|
- full update from child 'rc' into 'trunk'
- adds:
|
-
Property svn:eol-style set to
native
-
Property svn:executable set to
*
-
Property svn:keywords set to
Author Date Id Revision
|
File size:
1.2 KB
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | |
---|
3 | NAME=`date '+arbsrc_%Y_%m_%d__%H_%M.tgz'` |
---|
4 | |
---|
5 | dump_revision() { |
---|
6 | (./SOURCE_TOOLS/build_info.pl 1>&2) && \ |
---|
7 | grep ARB_SVN_REVISION ./TEMPLATES/svn_revision.h | \ |
---|
8 | perl -ne 'if (/ARB_SVN_REVISION\s+\"(.*)\"/) { $_=$1; s/:/_/; print $_; }' |
---|
9 | } |
---|
10 | |
---|
11 | REVISION=`dump_revision` |
---|
12 | REVISION_DIR=arbsrc_$REVISION |
---|
13 | echo REVISION_DIR=$REVISION_DIR |
---|
14 | |
---|
15 | |
---|
16 | rm_noerr() { |
---|
17 | test -f $1 && rm -f $1 |
---|
18 | } |
---|
19 | cleanup() { |
---|
20 | # rm_noerr arbsrc.lst |
---|
21 | rm_noerr arbsrc.lst.tmp |
---|
22 | test -L $REVISION_DIR && rm $REVISION_DIR |
---|
23 | true |
---|
24 | } |
---|
25 | |
---|
26 | gen_list() { |
---|
27 | util/arb_srclst.pl $* > arbsrc.lst.tmp || \ |
---|
28 | ( \ |
---|
29 | echo "Failed to build arbsrc.lst" ; \ |
---|
30 | if [ "$*" != "ignore" ] ; then \ |
---|
31 | echo "To ignore this error save manually using 'make save2' (only works in SVN checkout)"; \ |
---|
32 | fi; \ |
---|
33 | false \ |
---|
34 | ) |
---|
35 | } |
---|
36 | sort_list() { |
---|
37 | sort < arbsrc.lst.tmp | perl -pne "s/^\./.\/$REVISION_DIR/g;" > arbsrc.lst |
---|
38 | } |
---|
39 | gen_tarball() { |
---|
40 | ln -s . $REVISION_DIR && \ |
---|
41 | tar -zcf $NAME --files-from=arbsrc.lst && \ |
---|
42 | ( rm -f arbsrc.tgz ; \ |
---|
43 | ln -s $NAME arbsrc.tgz ; \ |
---|
44 | true ) |
---|
45 | } |
---|
46 | |
---|
47 | save() { |
---|
48 | gen_list $* && sort_list && gen_tarball |
---|
49 | } |
---|
50 | |
---|
51 | (save $* && cleanup && (ls -alG -rt arbsrc*;true)) || \ |
---|
52 | (cleanup;echo "Failed to create source tarball";false) |
---|
Note: See
TracBrowser
for help on using the repository browser.