diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-02-02 01:48:25 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-02-02 01:48:25 -0500 |
commit | 3f0dede97ee6c75c32cefd283eb65be782e4b84b (patch) | |
tree | 7af673bf517c3908f35ea1cf8b5d98ba8e0b9b85 /src/chroot-tools | |
parent | c43f0808583070a22e904cd650e8ed17fe781806 (diff) |
librechroot: fix setting CHROOTEXTRAPKG
Diffstat (limited to 'src/chroot-tools')
-rwxr-xr-x | src/chroot-tools/librechroot | 8 |
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 |