forked from brazilofmux/tinymux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dowin32.sh
113 lines (105 loc) · 2.91 KB
/
dowin32.sh
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#!/bin/sh
#
# REQUIRED: The two ReferenceDir must already exist. They may be created by
# untaring a previous distribution.
#
OldBuild=3
OldVersion=2.13.0.$OldBuild
NewBuild=4
NewVersion=2.13.0.$NewBuild
ChangesDir=mux
ReferenceDir=mux2.13_$OldBuild
DistroDir=mux2.13
NewDir=mux2.13_$NewBuild
patchableFiles=`cat win32/TOC.src.patchable`
unpatchedFiles=`cat win32/TOC.src.unpatched`
removeFiles=`cat win32/TOC.src.removed`
# Build source patchfile
#
rm -rf $NewDir\_src $DistroDir
cp -r $ReferenceDir\_src $DistroDir
cp -r $ReferenceDir\_src $NewDir\_src
for i in $patchableFiles;
do
cp $ChangesDir/$i $NewDir\_src/$i
done
cp $ChangesDir/src/autoconf-win32.h $NewDir\_src/src/autoconf.h
cp $ChangesDir/src/modules/autoconf-win32.h $NewDir\_src/src/modules/autoconf.h
for i in $removeFiles;
do
if [ -e $NewDir\_src/$i ]; then
echo Removing: $NewDir\_src/$i
rm $NewDir\_src/$i
fi
done
chmod -R u+rw $DistroDir $NewDir\_src
/cygdrive/c/binpatch/genpatch $DistroDir $NewDir\_src -d mux-$OldVersion-$NewVersion.win32.src.utp
# Build source tarballs
#
rm -rf $DistroDir
for i in $unpatchedFiles;
do
cp $ChangesDir/$i $NewDir\_src/$i
done
for i in $removeFiles;
do
if [ -e $NewDir\_src/$i ]; then
echo Removing: $NewDir\_src/$i
rm $NewDir\_src/$i
fi
done
cp -r $NewDir\_src $DistroDir
chmod -R u+rw $DistroDir $NewDir\_src
if [ -e mux-$NewVersion.win32.src.tar.gz ]; then
rm mux-$NewVersion.win32.src.tar.gz
fi
tar czf mux-$NewVersion.win32.src.tar.gz $DistroDir
if [ -e mux-$NewVersion.win32.src.zip ]; then
rm mux-$NewVersion.win32.src.zip
fi
/cygdrive/c/binnt/pkzip -add -recurse -path -maximum mux-$NewVersion.win32.src.zip $DistroDir\\\*.\*
patchableFiles=`cat win32/TOC.bin.patchable`
unpatchedFiles=`cat win32/TOC.bin.unpatched`
removeFiles=`cat win32/TOC.bin.removed`
# Build binary patchfile
#
rm -rf $NewDir\_bin $DistroDir
cp -r $ReferenceDir\_bin $DistroDir
cp -r $ReferenceDir\_bin $NewDir\_bin
for i in $patchableFiles;
do
cp $ChangesDir/$i $NewDir\_bin/$i
done
for i in $removeFiles;
do
if [ -e $NewDir\_bin/$i ]; then
echo Removing: $NewDir\_bin/$i
rm $NewDir\_bin/$i
fi
done
chmod -R u+rw $DistroDir $NewDir\_bin
/cygdrive/c/binpatch/genpatch $DistroDir $NewDir\_bin -d mux-$OldVersion-$NewVersion.win32.bin.utp
# Build binary tarballs
#
rm -rf $DistroDir
for i in $unpatchedFiles;
do
cp $ChangesDir/$i $NewDir\_bin/$i
done
for i in $removeFiles;
do
if [ -e $NewDir\_bin/$i ]; then
echo Removing: $NewDir\_bin/$i
rm $NewDir\_bin/$i
fi
done
cp -r $NewDir\_bin $DistroDir
chmod -R u+rw $DistroDir $NewDir\_bin
if [ -e mux-$NewVersion.win32.bin.tar.gz ]; then
rm mux-$NewVersion.win32.bin.tar.gz
fi
tar czf mux-$NewVersion.win32.bin.tar.gz $DistroDir
if [ -e mux-$NewVersion.win32.bin.zip ]; then
rm mux-$NewVersion.win32.bin.zip
fi
/cygdrive/c/binnt/pkzip -add -recurse -path -maximum mux-$NewVersion.win32.bin.zip $DistroDir\\\*.\*