summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2010-06-26 21:02:15 +0200
committerJonas Smedegaard <dr@jones.dk>2010-06-26 21:02:15 +0200
commit47b264def62c9cc6da38da14d32e4f8a524baf23 (patch)
tree7a99800a5a5e766509ce6f4823f2b035be03f6af
parentc6dac8ec87a7f9498b65e622b164dfc8da4b1de4 (diff)
Fix regex handling (grep by default see no \b at eol).
-rwxr-xr-xlocaldebpool6
1 files changed, 3 insertions, 3 deletions
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")