From: Michael Prokop Date: Sat, 28 May 2011 13:00:58 +0000 (+0200) Subject: sources.list handling: match "sid" and "unstable" only as whole words. X-Git-Tag: v0.14.1~3 X-Git-Url: https://git.grml.org/?p=grml-live.git;a=commitdiff_plain;h=2017df2408d7a815e4594d93501e3253b8d799ca;hp=4fd4ee2327db1cd93c79fca3cd3de1adef187544 sources.list handling: match "sid" and "unstable" only as whole words. 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. --- diff --git a/grml-live b/grml-live index 0c27ce1..95e3dab 100755 --- 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"