3 # This is a package updating script for msysGit
5 cd "$(dirname "$0")" ||
{
6 echo "Could not switch to $(dirname "$0")"
11 list
=fileList-tkImg.txt
14 tar=tkimg
$version.
tar.bz2
16 url
=http
://kent.dl.sourceforge.net
/sourceforge
/tkimg
/$tar
20 git rev-parse
--verify HEAD^ ||
{
21 perl
-i.bak
-pe "s/(MP-RAS.*relid)\'/\\1/" \
22 $
(find -name configure
) &&
23 perl
-i.bak
-pe "s/EXTERN (int TkimgInitUtilities)/\\1/" \
25 git commit
-m "fix configure" -a
31 configure_extra
=--srcdir=$
(pwd)/$dir
34 perl
-i.bak
-pe "s/-L(\\S+) -l(tkimgstub\S+)/\\1\/\\2.a/" \
35 $
(find -name Makefile
)
40 # The functions (overridable by setting $fetch, $unpack, $compile or $install)
43 test -f $tar || curl
$url > $tar
46 test -z "$fetch" && fetch
=fetch_it
49 test -d $dir ||
tar -xv $taropt -f $tar
52 test -z "$unpack" && unpack
=unpack_it
54 test -z "$premake" && premake
=true
58 .
/configure
--prefix=/mingw
$configure_extra &&
64 test -z "$compile" && compile
=compile_it
70 test -z "$install" && install=install_it
76 git commit
-m "imported $package $version"
95 index
=$
(/share
/msysGit
/pre-install.sh
) &&
97 # Remove old files stored in the file list
98 cat $list |
(cd / && xargs -r git
rm) &&
100 (cd $dir && $install) &&
102 /share
/msysGit
/post-install.sh
$index "Install $package $version" &&
104 git
diff --diff-filter=AM
--name-only HEAD^
! |
105 sed -e "s/^/\//" > $list &&
106 git commit
-C HEAD
--amend $list ||
109 echo "Successfully built and installed $package $version"
110 echo "After checking the result, please commit (possibly with --amend)"