git ssb

0+

cel / freecheck



Commit 8ddda7e41aec774df0ba03110c7a5b5e7d2cc3bc

use system installed config as a template

If the user does not have their own config file setup yet bootstrap one
off of the system default config.
Caleb Maclennan committed on 3/10/2014, 10:19:48 PM
Parent: ff3eb6182008ac4289c03fd10df56dc7118f7fea

Files changed

freecheckchanged
freecheckView
@@ -23,13 +23,20 @@
2323 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
2424 #
2525 #---------------
2626
27-$version = "0.3";
28-$ConfigFile = "freecheck.cfg";
27 +$version = "0.3.1";
28 +$systemConfigFile = "/etc/freecheck/freecheck.cfg";
29 +$ConfigFile = $ENV{"HOME"} . "/.freecheck.cfg";
2930
3031 use Getopt::Long;
32 +use File::Copy qw(copy);
3133
34 +
35 +if ( ! -e $ConfigFile ) {
36 + copy $systemConfigFile, $ConfigFile;
37 +}
38 +
3239 # This tells us how to format the strings from the cfg file
3340 # so we can print it as a PostScript definition
3441 # The key read will replace "value" for each of these
3542 # Strings are enclosed in parentheses (String) (Foobar)

Built with git-ssb-web