Fix semantics of "general."{systemdialogs,progressbar}

These were renamed from "skip_"* to *. However, we only changed syntax
and didn't invert their semantic meaning. Fix this by negating the
semantics of those variables. Also, negate these in the configuration
file automatically when running `calcurse-upgrade`.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
Lukas Fleischer
2012-03-29 17:06:56 +02:00
parent 8916293a26
commit c85c3cce55
8 changed files with 31 additions and 23 deletions

View File

@@ -63,5 +63,13 @@ if grep -q -e '^auto_save=' -e '^auto_gc=' -e '^periodic_save=' \
-e '/^daemon.log=/{N;s/\n//}' "$CONFFILE" > "$tmpfile" || exit 1
mv "$tmpfile" "$CONFFILE" || exit 1
fi
awk '
BEGIN { FS=OFS="=" }
$1 == "general.systemdialogs" || $1 == "general.progressbar" \
{ $2 = ($2 == "yes") ? "no" : "yes" }
{ print }
' < "$CONFFILE" > "$tmpfile" || exit 1
mv "$tmpfile" "$CONFFILE" || exit 1
fi