X-Git-Url: https://git.madduck.net/code/myrepos.git/blobdiff_plain/fca9fb631455f518ae828b36c0fe355a3c8c0665..01faa6757d7012e3b9126cc02e8ac10502864526:/mr diff --git a/mr b/mr index 0bf6655..1f01803 100755 --- a/mr +++ b/mr @@ -1037,6 +1037,12 @@ sub loadconfig { } } $section=expandenv($section) if $trusted; + if ($section ne 'ALIAS' && + ! exists $config{$dir}{$section} && + exists $config{$dir}{DEFAULT}) { + # copy in defaults + $config{$dir}{$section}={ %{$config{$dir}{DEFAULT}} }; + } } elsif (/^(\w+)\s*=\s*(.*)/) { my $parameter=$1; @@ -1073,12 +1079,6 @@ sub loadconfig { if (! defined $section) { die "$f line $.: parameter ($parameter) not in section\n"; } - if ($section ne 'ALIAS' && - ! exists $config{$dir}{$section} && - exists $config{$dir}{DEFAULT}) { - # copy in defaults - $config{$dir}{$section}={ %{$config{$dir}{DEFAULT}} }; - } if ($section eq 'ALIAS') { $alias{$parameter}=$value; } @@ -1547,10 +1547,10 @@ lib = fi delta=`perl -wle 'print -f shift() ? int((-M _) * 24) : 9999' "$flagfile"` if [ "$delta" -lt "$2" ]; then - exit 0 + return 1 else touch "$flagfile" - exit 1 + return 0 fi }