Skip to content

Commit

Permalink
beesh: use validate_pkg_complete for check of completeness
Browse files Browse the repository at this point in the history
  • Loading branch information
donald committed Jul 1, 2016
1 parent 4c860b4 commit 5727cbe
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/beesh.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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}"
Expand Down

0 comments on commit 5727cbe

Please sign in to comment.