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 5, 2016
1 parent 29a17d8 commit c43b32f
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 @@ -991,10 +991,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 c43b32f

Please sign in to comment.