Skip to content

Commit

Permalink
beesh: add validate_pkg_complete, validate_pkg_complete_from_filename
Browse files Browse the repository at this point in the history
  • Loading branch information
donald committed Jul 5, 2016
1 parent 6becbc0 commit 1963674
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/beesh.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,19 @@ function check_repositories() {
fi
}

function validate_pkg_complete() {
test -n "$PKGNAME" -a -n "$PKGVERSION" -a -n "$PKGREVISION" -a "$PKGSUFFIX" = '.bee' || return 1
return 0
}

function validate_pkg_complete_from_filename() {
test -n "$PKGNAME" -a "$PKGSUFFIX" = '.bee' || return 1
test "$PKGFULLVERSION" = '0' && return 0 # versionless. bla-0
test -n "$PKGVERSION" -a -n "$PKGREVISION" && return 0 # with version bla-1.2.3-55
return 1
}

###############################################################################
function build_in_sourcedir() {
BUILD_IN_SOURCEDIR=1
}
Expand Down Expand Up @@ -788,7 +801,6 @@ function extract_new_package_variables() {
eval $("${BEE_BINDIR}/beeversion" "${PKGALLPKG}")
}

###############################################################################
###############################################################################
###############################################################################

Expand Down

0 comments on commit 1963674

Please sign in to comment.