-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmake-tarball
executable file
·94 lines (71 loc) · 1.68 KB
/
make-tarball
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#! /bin/sh -e
# this makes a tarball of the sources plus the media files
# you need to be in a directory with subdirectories race gamedat and avdata
if [ $# != 1 ]
then
echo "usage: make-tarball version-string"
exit 1
fi
rel="$1"
if [ ! -d race -o ! -d gamedat -o ! -d avdata ]
then
echo "bad directory structure - see os_linux/README"
exit 1
fi
outname=raceintospace-${rel}.tar.gz
if [ -f ${outname} ]
then
echo -n "ok to remove and recreate ${outname}? (y/n) "
read x
if [ "$x" != "y" ]
then
echo "aborted"
exit 1
fi
fi
if [ -d TMP.build ]
then
echo -n "ok to remove subdirectory TMP.build? (y/n) "
read x
if [ "$x" != "y" ]
then
echo "aborted"
exit 1
fi
fi
echo ""
echo "making: ${outname}"
echo "note - top of debian/changelog is:"
head -1 race/debian/changelog
echo ""
rm -rf TMP.build
mkdir TMP.build
cd TMP.build
if [ -z "$CVSROOT" ]
then
CVSROOT=:ext:raceintospace.cvs.sourceforge.net:/cvsroot/raceintospace
export CVSROOT
fi
# sure wish there was a way for cvs to tell me the list of files
# that it is managing, but we can do it the hard way - do an export
# to get the list of files, then copy the latest files to the
# staging area
cvs -z8 export -D now race
find race -type f -print > TMP.race
rm -rf race
(cd ..; cpio -pdvm TMP.build) < TMP.race
cvs -z8 export -D now gamedat
find gamedat -type f -print > TMP.gamedat
rm -rf gamedat
(cd ..; cpio -pdvm TMP.build) < TMP.gamedat
dir=raceintospace-${rel}
mv race ${dir}
mv gamedat ${dir}/gamedata
(cd ../avdata && git archive --format=tar HEAD) | tar -C ${dir} -xf -
(
cd ${dir}
aclocal -I m4
autoconf
rm -rf autom4te.cache
)
tar -czf ../${outname} ${dir}