summaryrefslogtreecommitdiffstats
path: root/newapkbuild.in
diff options
context:
space:
mode:
authorDubiousjim <dubiousjim@gmail.com>2013-07-05 00:21:19 -0400
committerNatanael Copa <ncopa@alpinelinux.org>2013-07-09 06:59:30 +0000
commitef9fb52908d3f423e6e537b84f62cb76c7868782 (patch)
treeae6e61c807f98893d84f189468444d5aa04ba3c7 /newapkbuild.in
parent7b2030a06ad926035fabbad64aac4ddeab0bb602 (diff)
downloadabuild-ef9fb52908d3f423e6e537b84f62cb76c7868782.tar.bz2
abuild-ef9fb52908d3f423e6e537b84f62cb76c7868782.tar.xz
various: use long options, rework usages
Diffstat (limited to 'newapkbuild.in')
-rwxr-xr-xnewapkbuild.in35
1 files changed, 18 insertions, 17 deletions
diff --git a/newapkbuild.in b/newapkbuild.in
index 0f95f19..1b65815 100755
--- a/newapkbuild.in
+++ b/newapkbuild.in
@@ -253,22 +253,23 @@ __EOF__
}
usage() {
- echo "$prog $abuild_ver"
- echo "usage: $prog [-cfh] [-d DESC] [-l LICENSE] [-n NAME] [-u URL] PKGNAME[-PKGVER]|SRCURL"
- echo "Options:"
- echo " -a Create autotools (use ./configure ...)"
- echo " -c Copy a sample init.d, conf.d, and install script to new directory"
- echo " -d Set package description (pkgdesc) to DESC"
- echo " -f Force even if directory already exist"
- echo " -h Show this help"
- echo " -l Set package license to LICENSE"
- echo " -n Set package name to NAME"
- echo " -p Create perl package (Assume Makefile.PL is there)"
- echo " -y Create python package (Assume setup.py is there)"
- echo " -u Set package URL"
- echo " -s Use sourceforge source URL"
- echo ""
- exit 0
+ cat >&2 <<__EOF__
+$prog $abuild_ver - generate a new APKBUILD
+Usage: $prog [-cfh] [-d DESC] [-l LICENSE] [-n NAME] [-u URL] PKGNAME[-PKGVER]|SRCURL
+Options:
+ -n Set package name to NAME
+ -d Set package description (pkgdesc) to DESC
+ -l Set package license to LICENSE
+ -u Set package URL
+ -a Create autotools (use ./configure ...)
+ -p Create perl package (Assume Makefile.PL is there)
+ -y Create python package (Assume setup.py is there)
+ -s Use sourceforge source URL
+ -c Copy a sample init.d, conf.d, and install script to new directory
+ -f Force even if directory already exist
+ -h Show this help
+
+__EOF__
}
while getopts "acd:fhl:n:pyu:s" opt; do
@@ -277,7 +278,7 @@ while getopts "acd:fhl:n:pyu:s" opt; do
'c') cpinitd=1;;
'd') pkgdesc="$OPTARG";;
'f') force=1;;
- 'h') usage;;
+ 'h') usage; exit;;
'l') license="$OPTARG";;
'n') pkgname="$OPTARG";;
'p') buildtype="perl";;