From 76c75b8971e4ad2f6c336c9413088e6fd0e70f69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Ismael=20Haase=20Hern=C3=A1ndez?= Date: Mon, 16 May 2011 10:51:42 -0500 Subject: librestage uses an error message when no package is staged --- librestage | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'librestage') diff --git a/librestage b/librestage index 498801b..e51975b 100755 --- a/librestage +++ b/librestage @@ -72,6 +72,7 @@ SRCPKGDEST=${SRCPKGDEST:-.} PKGEXT=".pkg.tar.?z" +staged='n' # Copies the packages to the specified repos inside staging for _arch in ${arch[@]}; do for pkg in ${pkgname[@]}; do @@ -95,6 +96,7 @@ for _arch in ${arch[@]}; do exit 1 } && { msg2 "${pkg} staged on [${_repo}]" + staged='y' } } || { ln "${canonical}" "${WORKDIR}/staging/${_repo}/${pkgfile}" || { @@ -102,6 +104,7 @@ for _arch in ${arch[@]}; do exit 1 } && { msg2 "${pkg} staged on [${_repo}]" + staged='y' } } done @@ -109,4 +112,9 @@ for _arch in ${arch[@]}; do done done +if [ $staged = 'n' ]; then + error "No package was staged" + exit 1 +fi + exit 0 -- cgit v1.2.2