From ac6c975cde77b1fa8f3a8df2f9c966b3dc5fc90c Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 5 Jul 2014 02:10:21 -0400 Subject: xbs: create separate release-client and release-server sub-commands --- src/xbs/xbs | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) (limited to 'src/xbs') diff --git a/src/xbs/xbs b/src/xbs/xbs index ea762fb..a81d37c 100755 --- a/src/xbs/xbs +++ b/src/xbs/xbs @@ -54,8 +54,10 @@ usage() { 'Are there uncommited changes in `.`?' flag 'download' \ 'Download or update the tree' - flag "release $(_ 'REPO ARCH')" \ - 'Release `.`' + flag "release-client $(_ 'REPO ARCH')" \ + 'Release `.` (for developer boxes)' + flag "release-server $(_ 'REPO ARCH')" \ + 'Release `.` (for server boxes)' flag "unrelease $(_ 'PKGBASE REPO ARCH')" \ 'Unrelease a pkgbase' flag "move $(_ 'FROMREPO TOREPO PKGBASE')" \ @@ -77,16 +79,20 @@ download() { "$HELPER" download "$@" } -release() { - if [[ ! -f PKGBUILD ]]; then - error 'PKGBUILD not found' - exit 1 - fi +release-client() { if ! status; then error 'You have not committed your changes yet!' exit 1 fi - "$HELPER" release "$@" + "$HELPER" release-client "$@" +} + +release-server() { + if [[ ! -f PKGBUILD ]]; then + error 'PKGBUILD not found' + exit 1 + fi + "$HELPER" release-server "$@" } unrelease() { @@ -142,15 +148,15 @@ main() { case "$cmd" in status|download) [[ $# -eq 0 ]] || errusage 'bad number of argments' - $cmd "$@" + "$cmd" "$@" ;; - release) + release-client|release-server) [[ $# -eq 2 ]] || errusage 'bad number of argments' - $cmd "$@" + "$cmd" "$@" ;; move|unrelease|releasepath) [[ $# -eq 3 ]] || errusage 'bad number of argments' - $cmd "$@" + "$cmd" "$@" ;; *) errusage 'unknown command: %s' "$cmd";; esac -- cgit v1.2.3-54-g00ecf