summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2012-03-29 17:06:56 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2012-03-29 17:06:56 +0200
commitc85c3cce558b32c4fb00a339872d4dbe035d3f6c (patch)
treea1f854cda63db04b189a95221d08549ff6dcf487 /scripts
parent8916293a26e7a79e3bf969aac9895b2678946deb (diff)
downloadcalcurse-c85c3cce558b32c4fb00a339872d4dbe035d3f6c.tar.gz
calcurse-c85c3cce558b32c4fb00a339872d4dbe035d3f6c.zip
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>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/calcurse-upgrade8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/calcurse-upgrade b/scripts/calcurse-upgrade
index c7e9691..0d9b196 100644
--- a/scripts/calcurse-upgrade
+++ b/scripts/calcurse-upgrade
@@ -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