On Tue, Apr 2, 2013 at 3:20 PM, Michele Tartara <[email protected]> wrote:

> On Tue, Apr 2, 2013 at 3:18 PM, Klaus Aehlig <[email protected]> wrote:
>
>> > --- /dev/null
>> > +++ b/devel/build_chroot
>> > @@ -0,0 +1,139 @@
>> > +#!/bin/bash
>> > +#Configuration
>> > +CHROOTNAME=squeeze64
>>
>> What about just providing defaults for the configuration
>> instead of hard-coding values here? I.e., did you consider
>> using
>>
>> : ${CHROOTNAME:=squeeze64}
>>
>> instead?  (and similar for other configuration parameter)
>>
>
> Looks like a great idea, thanks.
>

Here it is!

Interdiff:
diff --git a/devel/build_chroot b/devel/build_chroot
index 065eacc..3a16881 100755
--- a/devel/build_chroot
+++ b/devel/build_chroot
@@ -1,8 +1,8 @@
 #!/bin/bash
 #Configuration
-CHROOTNAME=squeeze64
-CONF_DIR=/etc/schroot/chroot.d
-DATA_DIR=data
+: ${CHROOTNAME:=squeeze64}
+: ${CONF_DIR:=/etc/schroot/chroot.d}
+: ${DATA_DIR=data}

 #Automatically generated variables
 CHNAME=building_$CHROOTNAME


Thanks,
Michele

Reply via email to