From 2f745a416fa47ceb57e74c74bd766aeb2c62a9df Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 24 May 2015 19:55:49 -0600 Subject: xbs: Add `help` and `name` commands. --- src/xbs/xbs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/xbs/xbs') diff --git a/src/xbs/xbs b/src/xbs/xbs index 4691146..c42738d 100755 --- a/src/xbs/xbs +++ b/src/xbs/xbs @@ -69,7 +69,11 @@ usage() { 'Move a pkgbase from one repo to another' \ "$(_ '(srv) releasepath PKGBASE REPO ARCH')" \ 'Print the path to the staged version of pkgbase, or exit with - non-zero if not released' + non-zero if not released' \ + "$(_ '(any) name')" \ + 'Print a human-friendly version of the BUILDSYSTEM name' \ + "$(_ '(any) help')" \ + 'Show this message' } status() { @@ -116,6 +120,14 @@ releasepath() { "$HELPER" releasepath "$@" } +help() { + usage +} + +name() { + "$HELPER" name "$@" +} + main() { BUILDSYSTEM='' while getopts 'b:h' arg; do @@ -155,7 +167,7 @@ main() { local cmd=$1; shift case "$cmd" in - status|download) + status|download|name|help) [[ $# -eq 0 ]] || errusage 'bad number of argments' "$cmd" "$@" ;; -- cgit v1.2.2