summaryrefslogtreecommitdiff
path: root/librestage
diff options
context:
space:
mode:
authorJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-05-16 10:51:42 -0500
committerJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-05-16 10:51:42 -0500
commit76c75b8971e4ad2f6c336c9413088e6fd0e70f69 (patch)
tree7b5296fbfba6e2eaec22479453312681b4037fa9 /librestage
parent254af17f2eb70468d4b1b5d385a2e8154b45ea87 (diff)
librestage uses an error message when no package is staged
Diffstat (limited to 'librestage')
-rwxr-xr-xlibrestage8
1 files changed, 8 insertions, 0 deletions
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