Skip to content

Add fixes #12

Merged
merged 3 commits into from
Aug 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions src/beesh.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -145,17 +145,11 @@ function check_rebuild() {

print_warning "please increase revision number"

beefile_dir=${beefile%/*}
eval $(${BEEVERSION} "${beefile}")

beefile_pattern="${PKGFULLNAME}-${PKGFULLVERSION}"
beefile_pattern=${beefile_pattern//+/\\+} # replace all + with \+
beefile_pattern=${beefile_pattern//./\\.} # replace all . with \.

beefile_max=$(for bf in $(ls ${beefile%/*}/${beefile_pattern}*.bee ${BEE_BEEDIR}/${beefile_pattern}*.bee 2>/dev/null |\
grep -E "/${beefile_pattern}-[0-9]+.bee") ; do
echo "${bf}"
done | ${BEESORT} | tail -1)
shopt -s extglob
beefile_max=$( ls "${beefile%/*}/${beefile_pattern}"-+([0-9]).bee "${BEE_BEEDIR}/${beefile_pattern}"-+([0-9]).bee 2>/dev/null | ${BEESORT} | tail -1)

eval $(${BEEVERSION} ${beefile_max})
print_warning "cp ${beefile} ${PWD}/${PKGFULLNAME}-${PKGFULLVERSION}-$((PKGREVISION + 1)).bee"
Expand Down Expand Up @@ -998,7 +992,7 @@ config_export

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

check_rebuild "${BEE}" "${PKGALLPKG}"
check_rebuild "${BEE%/*}/${PKGFULLPKG}.bee" "${PKGALLPKG}"

print_info "current working directory: ${PWD}"

Expand Down
1 change: 1 addition & 0 deletions src/beeversion.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ static int ends_with(char *string,char *postfix)
if (postfix_len<=string_len) {
return strcmp(&string[string_len-postfix_len],postfix)==0;
}
return 0;
}

int scan_be0_version(char *filename,struct beeversion *versionsnummer)
Expand Down