diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-03-17 10:20:57 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-03-17 10:20:57 +0000 |
commit | f20d7983ae120359a3fc459c74fc2b513380b504 (patch) | |
tree | c41f148a995b653f3d0b6125471c84de93ebffc1 | |
parent | 149521f2dc8d9ca71d37fe287a7cc95c01f4cfd7 (diff) | |
download | abuild-f20d7983ae120359a3fc459c74fc2b513380b504.tar.gz abuild-f20d7983ae120359a3fc459c74fc2b513380b504.tar.bz2 abuild-f20d7983ae120359a3fc459c74fc2b513380b504.tar.xz abuild-f20d7983ae120359a3fc459c74fc2b513380b504.zip |
newapkbuild: support for creating sourceforge source urls
-rwxr-xr-x | newapkbuild.in | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/newapkbuild.in b/newapkbuild.in index 474d5bb..e8b7ea5 100755 --- a/newapkbuild.in +++ b/newapkbuild.in @@ -52,6 +52,10 @@ newaport() { mkdir -p "$pn" cd "$pn" + if [ -z "$source" ] && [ -n "$sourceforge" ]; then + source="http://downloads.sourceforge.net/$pn/$pn-$pv.tar.gz" + fi + # replace pkgver in $source if [ -n "$source" ]; then source=$(echo "$source" | sed "s/$pv/\$pkgver/g") @@ -167,11 +171,12 @@ usage() { echo " -h Show this help" echo " -l Set package license to LICENSE" echo " -u Set package URL" + echo " -s Use sourceforge source url" echo "" exit 0 } -while getopts "cd:fhl:u:" opt; do +while getopts "cd:fhl:u:s" opt; do case $opt in 'c') cpinitd=1;; 'd') pkgdesc="$OPTARG";; @@ -179,6 +184,7 @@ while getopts "cd:fhl:u:" opt; do 'h') usage;; 'l') license="$OPTARG";; 'u') url="$OPTARG";; + 's') sourceforge=1;; esac done shift $(( $OPTIND - 1 )) |