Debian Codegraph @

ReleaseTools/mega-tarball

raw symbols SCIP
1 #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. bash
2 # Make a mega-tarball for a given release.
3 # Must be run from the Release directorty.
4 if [scip-shell system . . `[`. $# -ne 1 ]
5 then echoscip-shell system . . echo. >&2 "usage: $0 release-num"
6 exit 1
7 fi
8 if [scip-shell system . . `[`. ${PWD##*/} != Release ]
9 then echoscip-shell system . . echo. >&2 "must be run from the Release directory"
10 exit 1
11 fi
12 set -e
13 #set -x
14 if [[ "$1" = *p? ]]
15 then typeset -i patch=${1##*p}
16 echoscip-shell system . . echo. "Is patch $patch."
17 rev=${1%p*}
18 else echoscip-shell system . . echo. "Is a base release."
19 typeset -i patch=0
20 rev=$1
21 fi
22 td=/tmp/mt$$
23 rmscip-shell system . . rm. -rf $td
24 mkdirscip-shell system . . mkdir. $td
25 cd $td
26 for i in x3270 c3270 wc3270 s3270 ws3270 tcl3270 pr3287 wpr3287
27 do typeset -i pp=$patch
28 while (( pp >= 0 ))
29 do if [scip-shell system . . `[`. $pp -eq 0 ]
30 then f=~-/$i-$rev-src.tgz
31 else f=~-/$i-${rev}p$pp-src.tgz
32 fi
33 [scip-shell system . . `[`. -f $f ] && break
34 if [scip-shell system . . `[`. $pp -eq 0 ]
35 then echoscip-shell system . . echo. >&2 "Can't find a matching rev of $i"
36 exit 1
37 fi
38 pp=pp-1
39 done
40
41 echoscip-shell system . . echo. "Using $f"
42 tarscip-shell system . . tar. -xzf $f
43 done
44 tarscip-shell system . . tar. -czf ~-/suite3270-$1-src.tgz *
45 chmodscip-shell system . . chmod. -w ~-/suite3270-$1-src.tgz
46 cd -
47 rmscip-shell system . . rm. -rf $td