File: release.sh

package info (click to toggle)
halibut 1.0-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 3,692 kB
  • ctags: 2,186
  • sloc: ansic: 53,839; makefile: 281; perl: 162; sh: 27
file content (36 lines) | stat: -rwxr-xr-x 1,084 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh 

# Make a Halibut release archive.

RELDIR="$1"
VERSION="$2"

linkmirror() {
    (cd "$1"; find . -name CVS -prune -o -name .svn -prune -o \
     -name build -prune -o -name reltmp -prune -o -type d -print) | \
     while read dir; do mkdir -p "$2"/"$dir"; done
    (cd "$1"; find . -name CVS -prune -o -name .svn -prune -o \
     -name build -prune -o -name reltmp -prune -o \
     -name '*.orig' -prune -o -name '*.rej' -prune -o \
     -name '*.txt' -prune -o -name '*.html' -prune -o \
     -name '*.1' -prune -o -name '.cvsignore' -prune -o \
     -name '*.gz' -prune -o -name '.[^.]*' -prune -o \
     -type f -print) | \
     while read file; do ln -s "$1"/"$file" "$2"/"$file"; done
}

linkmirror $PWD reltmp/$RELDIR
if ! test -d charset; then
    linkmirror $PWD/../charset reltmp/$RELDIR/charset
fi

if test "x${VERSION}y" != "xy"; then
    (cd reltmp/$RELDIR;
     find . -name '*.[ch]' -exec md5sum {} \;
     ) > reltmp/$RELDIR/manifest
    echo "-DVERSION=\"${VERSION}\"" > reltmp/$RELDIR/version;
fi

tar chzvoCf reltmp $RELDIR.tar.gz $RELDIR

rm -rf reltmp