3 # This is the Tcl/Tk updating script for msysGit
6 # Make sure that the working directory is clean and does not have untracked
7 # files; otherwise our semi-automatic finding the new files will not work!
10 git diff-files
--quiet &&
11 git diff-index
--cached --quiet HEAD
&&
12 test -z "$(git ls-files --exclude-from=.gitignore \
13 --exclude-per-directory=.gitignore --others)") ||
{
14 echo "State not pristine enough for successful Tcl/Tk update"
20 # Remove old Tcl/Tk files stored in fileList.txt
22 cat fileList.txt |
(cd / && xargs git
rm) ||
exit
24 mirror
=http
://kent.dl.sourceforge.net
/sourceforge
/tcl
/
30 u
=$mirror$p$version-src.
tar.gz
32 test -f $b || curl
$u > $b ||
exit
36 test -d $d ||
tar xzvf
$b ||
exit
39 shortversion
=$
(echo $version |
40 sed -e "s/[ab][0-9][0-9]*$//" -e "s/[^0-9]//g")
42 tcl
) prog
=tclsh
$shortversion.exe
;;
43 tk
) prog
=wish
$shortversion.exe
;;
45 test -f $d/win
/$prog ||
(
47 .
/configure
--prefix=/mingw
&&
53 test -f /mingw
/bin
/$prog ||
(
61 (cd / && git add .
) ||
exit
63 git
diff --cached --diff-filter=AM
--name-only |
64 sed -e "s/^/\//" > fileList.txt ||
67 git add fileList.txt ||
exit
69 echo "Successfully built and installed Tcl/Tk $version"
70 echo "After checking the result, please commit (possibly with --amend)"