Skip to content

Commit

Permalink
beesh: fix check_rebuild
Browse files Browse the repository at this point in the history
packages containing '+' did not work properly:

[BEE] package  already exists: /home/ruester/.local/src/bee/packages/gtk+-3.0.5-0.x86_64.bee.tar.bz2
[BEE] bee-file already exists: /home/ruester/.local/src/bee/bee-files/gtk+-3.0.5-0.bee
[BEE] please increase revision number
usage: beeversion <package>
[BEE] cp /home/ruester/git/bee.git/./gtk+-3.0.5-0.bee /home/ruester/git/bee.git/gtk+-3.0.5-1.bee

so now we prepare ${beefile_pattern} to be a regular expression by escaping
the characters + and . to \+ and \.
  • Loading branch information
Matthias Ruester authored and mariux committed Jun 1, 2015
1 parent 8691871 commit df6bacd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/beesh.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,16 @@ function check_rebuild() {
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)

eval $(${BEEVERSION} ${beefile_max})
print_warning "cp ${beefile} ${PWD}/${beefile_pattern}-$((PKGREVISION + 1)).bee"
print_warning "cp ${beefile} ${PWD}/${PKGFULLNAME}-${PKGFULLVERSION}-$((PKGREVISION + 1)).bee"

exit 1
}
Expand Down

0 comments on commit df6bacd

Please sign in to comment.