Commit f20d7983 authored by Natanael Copa's avatar Natanael Copa

newapkbuild: support for creating sourceforge source urls

parent 149521f2
......@@ -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 ))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment