sources.list handling: match "sid" and "unstable" only as whole words.
authorMichael Prokop <mika@grml.org>
Sat, 28 May 2011 13:00:58 +0000 (15:00 +0200)
committerMichael Prokop <mika@grml.org>
Sat, 28 May 2011 13:01:00 +0000 (15:01 +0200)
When we grep for "sid" this matches the string "consider", so make
sure we consider "sid" (and "unstable" while at it as well) only
if it's being used as a whole word.

Thanks to Andreas Korsten for reporting.

grml-live

index 0c27ce1..95e3dab 100755 (executable)
--- a/grml-live
+++ b/grml-live
@@ -439,7 +439,7 @@ for file in "$LIVE_CONF" "$CONFIG" "$LOCAL_CONFIG" ; do
 done
 
 # notice: activate grml-live pool only if we are building against unstable:
-if grep -qe unstable -qe sid "$SOURCES_LIST_FILE" ; then
+if grep -qwe unstable -qwe sid "$SOURCES_LIST_FILE" ; then
    grep -q 'grml-live.*main' "$SOURCES_LIST_FILE" || \
    grep grml-stable "$SOURCES_LIST_FILE" | \
         sed 's/grml-stable/grml-live/' >> "$SOURCES_LIST_FILE"