From 47b264def62c9cc6da38da14d32e4f8a524baf23 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sat, 26 Jun 2010 21:02:15 +0200 Subject: Fix regex handling (grep by default see no \b at eol). --- localdebpool | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'localdebpool') diff --git a/localdebpool b/localdebpool index 28b7d42..01bbc5f 100755 --- a/localdebpool +++ b/localdebpool @@ -26,7 +26,7 @@ compactlist() { } regexfromlist() { - echo $@ | sed 's/[[:space:]]\+/\\|/g; s/^/\\(/; s/$/\\)/' + echo $@ | sed 's/[[:space:]]\+/\\|/g; s/^/(/; s/$/)/' } sectionsfromhintstream() { @@ -181,7 +181,7 @@ esac # $PRVBASE/$buildhost/pool-$pool/$package/ # batchsections="$( \ - find "$PRVBASE" -type f -regex '.*/'"$pkg_re"'/HINTS' -exec cat '{}' ';' \ + find "$PRVBASE" -type f -regextype egrep -regex '.*/'"$pkg_re"'/HINTS' -exec cat '{}' ';' \ | sectionsfromhintstream )" batchsections="$(compactlist $batchsections)" @@ -207,7 +207,7 @@ fi # $PRVBASE/sections/$section/$dist/$section/$package/$pool/$buildhost # $PUBBASE/pkg/$package/$pool/$buildhost # -cd "$PRVBASE" && find * -type f -name HINTS -exec grep -q "^Sections:.*$batchsections_re" '{}' ';' -printf '%h\n' \ +cd "$PRVBASE" && find * -type f -name HINTS -exec grep -Pq "^Sections:.*$batchsections_re" '{}' ';' -printf '%h\n' \ | while read prvpkgdir; do debugprint "prvpkgdir: \"$prvpkgdir\"" set -- $(pkginfofromprvpkgdir "$prvpkgdir") -- cgit v1.2.3