blob: 3e78040af6bb635133e9db4fe36ade7b9011b194 (
plain)
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
|
#!/bin/sh
cvslist() {
if [ "$1" ]
then local prefix="$1/"
fi
cvs list $1 | grep -v "^?" | while read line
do
local path="$prefix$line"
echo "$path"
if [ -d "$path" ]
then
cvslist "$path"
fi
done
}
if ! [ "$1" ]
then
echo "usage: $0 <version>"
exit 1
fi
cvs list > /dev/null 2> /dev/null
if [ $? != 0 ]
then
echo "Your version of CVS may be too old. At least 1.12 is needed."
exit 1
fi
make clean
out="luarocks-$1"
rm -rf "$out"
mkdir "$out"
list=`cvslist`
rm -f missing_ref
echo "$list" | while read i
do
if [ -f "$i" ]
then
dir=`dirname $i`
mkdir -p "$out/$dir"
cp "$i" "$out/$dir"
if echo "$i" | grep -q "^src/"
then
grep -qw `basename "$i"` Makefile || {
echo "Missing ref in makefile: $i"
touch missing_ref
exit 1
}
fi
fi
done
if [ -e missing_ref ]
then
rm -f missing_ref
exit 1
fi
rm -f "$out-win32.zip" "$out.tar.gz"
rm "$out/makedist"
rm "$out/install.bat"
tar czvpf "$out.tar.gz" "$out"
cp install.bat "$out"
cp -a win32/bin "$out"
cp -a win32/lua5.1 "$out"
zip -r "$out-win32.zip" "$out"
rm -rf "$out"
|