r19069 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r19068‎ | r19069 | r19070 >
Date:18:10, 10 January 2007
Author:river
Status:old
Tags:
Comment:
allow .info to specify source URL to download if $pkg_src not present
Modified paths:
  • /trunk/tools/vanquish/vanquish (modified) (history)

Diff [purge]

Index: trunk/tools/vanquish/vanquish
@@ -78,6 +78,7 @@
7979 ldflags) pkg_ldflags="$rest";;
8080 cflags) pkg_cflags="$rest";;
8181 cppflags) pkg_cppflags="$rest";;
 82+ url) pkg_url="$rest";;
8283 *)
8384 errexit "$0: $INFO: unknown directive \"$cmd\""
8485 ;;
@@ -90,6 +91,12 @@
9192 [ -z "$pkg_src" ] && errexit "$0: $INFO: no src given"
9293 [ -z "$pkg_srcdir" ] && errexit "$0: $INFO: no srcdir given"
9394
 95+if ! [ -r $pkg_src ]; then
 96+ [ -z "$pkg_url" ] && errexit "$0: source archive $pkg_src does not exist and no URL given"
 97+ echo "+ download $pkg_src ..." >&2
 98+ /usr/sfw/bin/wget "-O$ROOT/$pkg_src" "$pkg_url" || errexit "$0: cannot download"
 99+fi
 100+
94101 echo "+ extract $pkg_src ..." >&2
95102 if [ "$pkg_src[-4,$#pkg_src]" = ".bz2" -o "$pkg_src[-5,$#pkg_src]" = ".tbz2" ]; then
96103 { bzip2 -dc $ROOT/$pkg_src | gtar xf - } || errexit "$0: cannot extract"