Installer: Do not quote / add slashes to SVN_SSH anymore
[msysgit/kirr.git] / src / tcltk / release.sh
blob1e2d3989247a543e5a58d39f0b2d6ca0c7bc7822
1 #!/bin/sh
3 # This is the Tcl/Tk updating script for msysGit
6 cd "$(dirname "$0")"
7 srcdir=$(pwd)
9 mirror=http://kent.dl.sourceforge.net/project/tcl/Tcl/
10 version=8.5.11
12 for p in tcl tk
14 # get the package
15 u=$mirror$version/$p$version-src.tar.gz
16 b=$(basename $u)
17 test -f $b || curl $u > $b || exit
19 # unpack it
20 d=$p$version
21 test -d $d || tar xzvf $b || exit
23 # compile it
24 shortversion=$(echo $version |
25 sed -n "s/^[^0-9]*\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1\2/p")
26 case $p in
27 tcl) prog=tclsh$shortversion.exe;;
28 tk) prog=wish$shortversion.exe;;
29 esac
30 test -f $d/win/$prog || (
31 cd $d/win &&
32 ./configure --prefix=/mingw &&
33 make ||
34 exit
37 # install it
38 test -f /mingw/bin/$prog && test /mingw/bin/$prog -nt $d/win/$prog || (
39 cd $d/win &&
41 # Record pre-install state
42 index=$(/share/msysGit/pre-install.sh) &&
44 # Remove old Tcl/Tk files stored in fileList.txt
45 list=$srcdir/fileList-$p.txt
46 cat "$list" | grep -v 'release\.sh$' | (cd / && xargs git rm) &&
48 make install &&
50 shortprog=$(echo $prog | tr -d '0-9') &&
51 if test ! -f /mingw/bin/$shortprog
52 then
53 ln /mingw/bin/$prog /mingw/bin/$shortprog
54 fi &&
56 /share/msysGit/post-install.sh $index \
57 "Update $p to version $version" &&
59 git diff --diff-filter=AM --name-only HEAD^! |
60 sed -e "s/^/\//" > "$list" &&
61 (cd / && git commit -C HEAD --amend -- "$list") ||
63 exit
65 done
67 echo "Successfully built and installed Tcl/Tk $version"
68 echo