fix anchoring bug in selection_state()

If foo and foobar were in a list and foobar was deselected, it would get
switched back on because foo would equally address foobar. So
s/$LINE/^$LINE /
This commit is contained in:
slakmagik 2011-03-07 11:44:16 +00:00
parent bdcb49f2a3
commit eab30f62f4

View File

@ -453,7 +453,7 @@ selection_state() {
sed -i 's/ON$/OFF/' $MENU_FILE sed -i 's/ON$/OFF/' $MENU_FILE
while read LINE; do while read LINE; do
sed -i "/$LINE/s/OFF$/ON/" $MENU_FILE sed -i "/^$LINE /s/OFF$/ON/" $MENU_FILE
done < $SELECTION_FILE done < $SELECTION_FILE
if [[ $1 == reverse ]]; then if [[ $1 == reverse ]]; then