From 5727cbea2b4c48bb87447eb25105180061749cd6 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Fri, 1 Jul 2016 13:15:50 +0200 Subject: [PATCH] beesh: use validate_pkg_complete for check of completeness --- src/beesh.sh.in | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/beesh.sh.in b/src/beesh.sh.in index 2b9f85d..f9d2ea1 100644 --- a/src/beesh.sh.in +++ b/src/beesh.sh.in @@ -192,7 +192,7 @@ function check_repositories() { } function validate_pkg_complete() { - test -n "$PKGNAME" -a -n "$PKGVERSION" -a -n "$PKGREVISION" -a "$PKGSUFFIX" = '.bee' || return 1 + test -n "$PKGNAME" -a -n "$PKGVERSION" -a -n "$PKGREVISION" || return 1 return 0 } @@ -993,10 +993,7 @@ fi extract_new_package_variables -if [ -z "${PKGNAME}" -o -z "${PKGVERSION}" -o -z "${PKGREVISION}" ] ; then - print_error "${BEE}: please use the proper package versioning (e.g. package-1.0-0)" - exit 1 -fi +validate_pkg_complete || bee_die "if you start from a generic file ( package-0.bee ) you need to call bee_version from inside the bee file (e.g. bee_version package-1.0-0)" BEEPKGROOT="${BEE_TMP_BUILDROOT}/${PKGNAME}" BEEWORKDIR="${BEEPKGROOT}/${PKGFULLPKG}"