Index: trunk/tools/vanquish/vanquish |
— | — | @@ -78,6 +78,7 @@ |
79 | 79 | ldflags) pkg_ldflags="$rest";; |
80 | 80 | cflags) pkg_cflags="$rest";; |
81 | 81 | cppflags) pkg_cppflags="$rest";; |
| 82 | + url) pkg_url="$rest";; |
82 | 83 | *) |
83 | 84 | errexit "$0: $INFO: unknown directive \"$cmd\"" |
84 | 85 | ;; |
— | — | @@ -90,6 +91,12 @@ |
91 | 92 | [ -z "$pkg_src" ] && errexit "$0: $INFO: no src given" |
92 | 93 | [ -z "$pkg_srcdir" ] && errexit "$0: $INFO: no srcdir given" |
93 | 94 | |
| 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 | + |
94 | 101 | echo "+ extract $pkg_src ..." >&2 |
95 | 102 | if [ "$pkg_src[-4,$#pkg_src]" = ".bz2" -o "$pkg_src[-5,$#pkg_src]" = ".tbz2" ]; then |
96 | 103 | { bzip2 -dc $ROOT/$pkg_src | gtar xf - } || errexit "$0: cannot extract" |