summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-05-24 19:55:49 -0600
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-05-24 19:55:49 -0600
commit2f745a416fa47ceb57e74c74bd766aeb2c62a9df (patch)
tree217293a2f28cdb37a6d1b25bbf9939b444d0acfd /src
parent6676aa71859641eaf7dcfb309200837c93510d51 (diff)
xbs: Add `help` and `name` commands.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/xbs-abs/helper-abs6
-rwxr-xr-xsrc/xbs-abslibre/helper-abslibre6
-rwxr-xr-xsrc/xbs/xbs16
3 files changed, 24 insertions, 4 deletions
diff --git a/src/xbs-abs/helper-abs b/src/xbs-abs/helper-abs
index 561694f..e9aac36 100755
--- a/src/xbs-abs/helper-abs
+++ b/src/xbs-abs/helper-abs
@@ -191,7 +191,11 @@ releasepath() {
return 1
}
+name() {
+ echo SVN
+}
+
case "$1" in
- status|download|release-client|release-server|unrelease|move|releasepath) "$@";;
+ status|download|release-client|release-server|unrelease|move|releasepath|name) "$@";;
*) exit 127;;
esac
diff --git a/src/xbs-abslibre/helper-abslibre b/src/xbs-abslibre/helper-abslibre
index c2dc068..e6f2f24 100755
--- a/src/xbs-abslibre/helper-abslibre
+++ b/src/xbs-abslibre/helper-abslibre
@@ -189,7 +189,11 @@ releasepath() {
return 1
}
+name() {
+ echo ABSLibre
+}
+
case "$1" in
- status|download|release-client|release-server|unrelease|move|releasepath) "$@";;
+ status|download|release-client|release-server|unrelease|move|releasepath|name) "$@";;
*) exit 127;;
esac
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" "$@"
;;