3 # This is the Tcl/Tk updating script for msysGit
9 mirror
=http
://kent.dl.sourceforge.net
/project
/tcl
/Tcl
/
15 u
=$mirror$version/$p$version-src.
tar.gz
17 test -f $b || curl
$u > $b ||
exit
21 test -d $d ||
tar xzvf
$b ||
exit
24 shortversion
=$
(echo $version |
25 sed -n "s/^[^0-9]*\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1\2/p")
27 tcl
) prog
=tclsh
$shortversion.exe
;;
28 tk
) prog
=wish
$shortversion.exe
;;
30 test -f $d/win
/$prog ||
(
32 .
/configure
--prefix=/mingw
&&
38 test -f /mingw
/bin
/$prog && test /mingw
/bin
/$prog -nt $d/win
/$prog ||
(
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) &&
50 shortprog
=$
(echo $prog |
tr -d '0-9') &&
51 if test ! -f /mingw
/bin
/$shortprog
53 ln /mingw
/bin
/$prog /mingw
/bin
/$shortprog
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
-n -C HEAD
--amend -- "$list") ||
67 echo "Successfully built and installed Tcl/Tk $version"