summaryrefslogtreecommitdiff
path: root/src/chroot-tools/librechroot
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-02-02 01:48:25 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-02-02 01:48:25 -0500
commit3f0dede97ee6c75c32cefd283eb65be782e4b84b (patch)
tree7af673bf517c3908f35ea1cf8b5d98ba8e0b9b85 /src/chroot-tools/librechroot
parentc43f0808583070a22e904cd650e8ed17fe781806 (diff)
librechroot: fix setting CHROOTEXTRAPKG
Diffstat (limited to 'src/chroot-tools/librechroot')
-rwxr-xr-xsrc/chroot-tools/librechroot8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot
index 7b1e4a9..fcabcff 100755
--- a/src/chroot-tools/librechroot
+++ b/src/chroot-tools/librechroot
@@ -342,10 +342,12 @@ main() {
mkdir -p "$copydir/etc/libretools.d"
{
- if [[ -n ${CHROOTEXTRAPKG[*]:-} ]]; then
- declare -p CHROOTEXTRAPKG | sed -r 's/declare( -.)* //'
+ if [[ ${#CHROOTEXTRAPKG[*]} -eq 0 ]]; then
+ echo 'CHROOTEXTRAPKG=()'
else
- printf 'CHROOTEXTRAPKG=()\n'
+ printf 'CHROOTEXTRAPKG=('
+ printf '%q ' "${CHROOTEXTRAPKG[@]}"
+ printf ')\n'
fi
} > "$copydir"/etc/libretools.d/chroot.conf