forked from msysgit/msysgit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrelease.sh
More file actions
69 lines (52 loc) · 1.41 KB
/
release.sh
File metadata and controls
69 lines (52 loc) · 1.41 KB
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
# This is the Tcl/Tk updating script for msysGit
cd "$(dirname "$0")"
srcdir=$(pwd)
mirror=http://kent.dl.sourceforge.net/project/tcl/Tcl/
version=8.5.11
for p in tcl tk
do
# get the package
u=$mirror$version/$p$version-src.tar.gz
b=$(basename $u)
test -f $b || curl $u > $b || exit
# unpack it
d=$p$version
test -d $d || tar xzvf $b || exit
# compile it
shortversion=$(echo $version |
sed -n "s/^[^0-9]*\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1\2/p")
case $p in
tcl) prog=tclsh$shortversion.exe;;
tk) prog=wish$shortversion.exe;;
esac
test -f $d/win/$prog || (
cd $d/win &&
./configure --prefix=/mingw &&
make ||
exit
)
# install it
test -f /mingw/bin/$prog && test /mingw/bin/$prog -nt $d/win/$prog || (
cd $d/win &&
# Record pre-install state
index=$(/share/msysGit/pre-install.sh) &&
# Remove old Tcl/Tk files stored in fileList.txt
list=$srcdir/fileList-$p.txt
cat "$list" | grep -v 'release\.sh$' | (cd / && xargs git rm) &&
make install &&
shortprog=$(echo $prog | tr -d '0-9') &&
if test ! -f /mingw/bin/$shortprog
then
ln /mingw/bin/$prog /mingw/bin/$shortprog
fi &&
/share/msysGit/post-install.sh $index \
"Update $p to version $version" &&
git diff --diff-filter=AM --name-only HEAD^! |
sed -e "s/^/\//" > "$list" &&
(cd / && git commit -C HEAD --amend -- "$list") ||
exit
)
done
echo "Successfully built and installed Tcl/Tk $version"
echo