23 Commits

Author SHA1 Message Date
Lukas Fleischer
213e5f86a5 Update copyright ranges for 2023
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2023-04-11 17:04:24 -04:00
Lukas Fleischer
01ad848628 Update copyright ranges for 2022
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2022-03-11 11:33:19 -05:00
Lukas Fleischer
5ad76df5fe Update copyright ranges
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2020-01-30 19:22:23 +01:00
Nitroretro
023ca55493 calcurse-upgrade: use $XDG_CONFIG_HOME
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-12-23 13:16:39 -05:00
Lukas Fleischer
9f6678bc49 Update copyright ranges
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2017-01-12 08:40:30 +01:00
Lukas Fleischer
978d24a9d2 Update copyright ranges
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2016-01-30 11:21:53 +01:00
Lukas Fleischer
9ef427693b Update copyright ranges
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2015-02-07 11:42:20 +01:00
Lukas Fleischer
a7944d335e Update copyright ranges
Add 2013 to the copyright range for all source and documentation files.

Reported-by: Frederic Culot <frederic@culot.org>
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-02-04 20:10:14 +01:00
Lukas Fleischer
844d35e851 calcurse-upgrade: Create a backup before upgrading
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>
2012-06-10 11:47:18 +02:00
Lukas Fleischer
fa1f0a5c44 calcurse-upgrade: Display error if temp file exists
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>
2012-06-01 16:07:48 +02:00
Lukas Fleischer
f44b307e22 calcurse-upgrade: Change location of temporary file
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>
2012-06-01 16:07:48 +02:00
Lukas Fleischer
1022781821 calcurse-upgrade: Add "-h" and "-v" options
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>
2012-06-01 16:07:48 +02:00
Lukas Fleischer
9be3a9c1f0 scripts/: Add support for placeholders
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>
2012-06-01 16:07:46 +02:00
Lukas Fleischer
2afa0db66f calcurse-upgrade: Error out on unknown option
Display an error message and bail out if an invalid command line option
is passed.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2012-06-01 15:51:00 +02:00
Lukas Fleischer
0d50e4539f scripts/calcurse-upgrade.sh: Fix POSIX compatibility
* 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>
2012-06-01 15:50:57 +02:00
Baptiste Jonglez
2c5235cca7 Make appearance.calendarview more explicit in config file
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>
2012-05-31 20:45:42 +02:00
Lukas Fleischer
7fa1f0e2aa Add localization to calcurse-upgrade
* 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>
2012-05-23 17:25:41 +02:00
Lukas Fleischer
de114ce437 scripts/calcurse-upgrade: Add debug output
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2012-05-23 16:41:47 +02:00
Lukas Fleischer
7bec0d47ee scripts/calcurse-upgrade: Add a "--config" option
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>
2012-05-23 16:31:02 +02:00
Lukas Fleischer
61472a32cd scripts/calcurse-upgrade: Set "-e"
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>
2012-05-23 16:12:24 +02:00
Lukas Fleischer
6c11b8985c Fix data type of "general.firstdayofweek"
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>
2012-05-17 22:08:00 +02:00
Lukas Fleischer
c85c3cce55 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>
2012-03-29 17:06:56 +02:00
Lukas Fleischer
afa57d77c0 Add a configuration file upgrade script
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>
2012-03-29 11:52:07 +02:00