aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* calcurse-upgrade: Create a backup before upgradingLukas Fleischer2012-06-101-0/+22
| | | | | | | | Make sure the user doesn't end up in a configuration file being totally broken if the upgrade script fails unexpectedly. The backup file is removed if the conversion completed successfully. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* calcurse-upgrade: Display error if temp file existsv3.0.0-rc1Lukas Fleischer2012-06-011-1/+7
| | | | | | | Instead of bailing out without any hint, show an error message if the temporary file we use in calcurse-upgrade already exists. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* calcurse-upgrade: Change location of temporary fileLukas Fleischer2012-06-011-1/+1
| | | | | | | | | | | | | | | Instead of creating the temporary file in a central location, place it in the same directory as the configuration file. Pros: * No need to rely on the "$TMPDIR" environment variable. * Multiple users can upgrade their configuration files at the same time, even if "$!" isn't set properly. * One user can upgrade several configuration files (in different directories or with different file names) at once. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* calcurse-upgrade: Add "-h" and "-v" optionsLukas Fleischer2012-06-011-0/+9
| | | | | | | Add "-h"/"--help" options to print a usage message and "-v"/"--version" to print the current version. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* scripts/: Add support for placeholdersLukas Fleischer2012-06-012-3/+9
| | | | | | | | | Allow for specifying placeholders in shell scripts that are replaced during build time. Predefine a "@PACKAGE_VERSION@" placeholder that is replaced with the current version number. Also, rename all shell scripts to ".sh.in". Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* calcurse-upgrade: Error out on unknown optionLukas Fleischer2012-06-011-4/+9
| | | | | | | Display an error message and bail out if an invalid command line option is passed. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* scripts/calcurse-upgrade.sh: Fix POSIX compatibilityLukas Fleischer2012-06-011-23/+90
| | | | | | | | | | * Split sed(1) one-liners into multiple lines. POSIX sed(1) doesn't allow separating functions by semicolons. * Escape a newline in the awk(1) script. POSIX awk(1) only allows non-escaped line breaks in specific contexts. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Make appearance.calendarview more explicit in config fileBaptiste Jonglez2012-05-311-0/+2
| | | | | | | | | | Instead of using 0 or 1 as a value for `appearance.calendarview`, introduce the more explicit "monthly" and "weekly". Also update `scripts/calcurse-upgrade.sh` to reflect the change. Signed-off-by: Baptiste Jonglez <baptiste--git@jonglez.org> Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Add localization to calcurse-upgradeLukas Fleischer2012-05-232-5/+17
| | | | | | | | | | | * Use gettext in "scripts/calcurse-upgrade". * Add "scripts/calcurse-upgrade" to "po/POTFILES.in". * Rename "scripts/calcurse-upgrade" to "scripts/calcurse-upgrade.sh" to make sure xgettext(1) detects the correct input file format. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* scripts/calcurse-upgrade: Add debug outputLukas Fleischer2012-05-231-0/+7
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* scripts/calcurse-upgrade: Add a "--config" optionLukas Fleischer2012-05-231-1/+10
| | | | | | | This allows for specifying an alternate configuration file which is useful if you use a non-default data directory. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* scripts/calcurse-upgrade: Set "-e"Lukas Fleischer2012-05-231-6/+8
| | | | | | | | | | | | | | | | From the set(1p) man page: When this option is on, if a simple command fails for any of the reasons listed in Consequences of Shell Errors or returns an exit status value >0, and is not part of the compound list following a while, until, or if keyword, and is not a part of an AND or OR list, and is not a pipeline preceded by the ! reserved word, then the shell shall immediately exit. This allows us to remove all the "|| exit 1" statements we used to bail out if one command fails. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Fix data type of "general.firstdayofweek"Lukas Fleischer2012-05-171-0/+1
| | | | | | | | | | | This option wasn't converted to a proper data type when it was renamed from "week_begins_on_monday" to "general.firstdayofweek". Convert the boolean option into an enumeration type that can take the values "monday" and "sunday". Also, update the documentation, add a conversion rule to the upgrade script and convert the configuration file used in the test suite. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Fix semantics of "general."{systemdialogs,progressbar}Lukas Fleischer2012-03-291-0/+8
| | | | | | | | | 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>
* Add a configuration file upgrade scriptLukas Fleischer2012-03-292-0/+70
This isn't ready for distribution but allows users of the -git version of calcurse to easily update their configuration files without having to edit them manually. Following things are still missing here: * A command line parameter to specify a custom data directory. * A backup file that is created automatically before upgrading. * Debug output. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>