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
freecheck | changed |
freecheck | ||
---|---|---|
@@ -23,13 +23,20 @@ | ||
23 | 23 … | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
24 | 24 … | # |
25 | 25 … | #--------------- |
26 | 26 … | |
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"; | |
29 | 30 … | |
30 | 31 … | use Getopt::Long; |
32 … | +use File::Copy qw(copy); | |
31 | 33 … | |
34 … | + | |
35 … | +if ( ! -e $ConfigFile ) { | |
36 … | + copy $systemConfigFile, $ConfigFile; | |
37 … | +} | |
38 … | + | |
32 | 39 … | # This tells us how to format the strings from the cfg file |
33 | 40 … | # so we can print it as a PostScript definition |
34 | 41 … | # The key read will replace "value" for each of these |
35 | 42 … | # Strings are enclosed in parentheses (String) (Foobar) |
Built with git-ssb-web