case "$new:" in *:$i:*) continue;; esac
if ! [ -d $i ]; then continue; fi
case "$val" in
- "") val=$i change=t; continue ;;
$i) continue ;;
*:$i:*) val=${val%%:$i:*}:${val#*:$i:} ;;
$i:*) val=${val#$i:} ;;
new=$new:$i change=t
done
case $dir in
- l) val=${new#:}:$val ;;
- r) val=$val$new ;;
+ l) val=${new#:}${val:+:$val} ;;
+ r) val=${val:+$val:}${new#:} ;;
esac
case $change in t) eval $var=\$val ;; esac
}
fi
}
+## __mdw_export_if_defined VAR ...
+##
+## If VARs are defined, then export them.
+__mdw_export_if_defined () {
+ local var t
+ for var in "$@"; do
+ eval t=\${$var+t}
+ case $t in t) export $var ;; esac
+ done
+}
+
###--------------------------------------------------------------------------
### Other preliminaries.
## Configure `ps'.
PS_PERSONALITY=gnu; export PS_PERSONALITY
+## Configure Debian building.
+DEB_BUILD_OPTIONS="parallel=$(mdw-conf make-parallel 4)"
+export DEB_BUILD_OPTIONS
+
## Turn off angry fruit salad error messages from things.
DPKG_COLORS=never; export DPKG_COLORS
GCC_COLORS=; export GCC_COLORS