From: Joachim Breitner <[email protected]> To be able to write unit tests for wanna-build, make sure that we can fill out config variables before running the script. --- bin/wanna-build | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/bin/wanna-build b/bin/wanna-build index 2f3cfd6..74770b5 100755 --- a/bin/wanna-build +++ b/bin/wanna-build @@ -21,10 +21,10 @@ package conf; # defaults -$basedir = "/var/lib/debbuild"; -$dbbase = "build-db"; -$transactlog = "transactions.log"; -$mailprog = "/usr/sbin/sendmail"; +$basedir ||= "/var/lib/debbuild"; +$dbbase ||= "build-db"; +$transactlog ||= "transactions.log"; +$mailprog ||= "/usr/sbin/sendmail"; require "/etc/wanna-build.conf"; die "$conf::basedir is not a directory\n" if ! -d $conf::basedir; die "dbbase is empty\n" if ! $dbbase; -- 1.6.3.3 -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]
