diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2017-04-20 23:05:42 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2017-05-04 14:30:02 -0400 |
commit | 7d584af432202470d9d8fefd74a7f7ed044c4ab3 (patch) | |
tree | 0db3e165bd055a5f56c1a8548333b0dc87c27774 /src/chroot-tools | |
parent | 2ae5371f347603d34a7ccc33681e612db338d11e (diff) |
random tidy up
Diffstat (limited to 'src/chroot-tools')
-rwxr-xr-x | src/chroot-tools/distcc-tool | 2 | ||||
-rw-r--r-- | src/chroot-tools/hooks-chcleanup.sh | 1 | ||||
-rwxr-xr-x | src/chroot-tools/librechroot | 6 |
3 files changed, 5 insertions, 4 deletions
diff --git a/src/chroot-tools/distcc-tool b/src/chroot-tools/distcc-tool index d799c4a..6f7a684 100755 --- a/src/chroot-tools/distcc-tool +++ b/src/chroot-tools/distcc-tool @@ -142,7 +142,7 @@ parse_DISTCC_HOSTS() { ;; # TCP_HOST or OLDSTYLE_TCP_HOST *) - declare HOSTID= PORT= LIMIT= OPTIONS= + declare HOSTID='' PORT='' LIMIT='' OPTIONS='' if [[ $HOSTSPEC =~ ^([^:/]+)(:([0-9]+))?(/([0-9]+))?(,.*)?$ ]]; then # TCP_HOST HOSTID=${BASH_REMATCH[1]} diff --git a/src/chroot-tools/hooks-chcleanup.sh b/src/chroot-tools/hooks-chcleanup.sh index e76eac0..3a13aab 100644 --- a/src/chroot-tools/hooks-chcleanup.sh +++ b/src/chroot-tools/hooks-chcleanup.sh @@ -20,6 +20,7 @@ hook_pre_build+=("clean_chroot") clean_chroot() ( local copydir=$1 + if $INCHROOT; then cd /startdir "$(librelib chroot/chcleanup)" diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot index fba7e91..7b1c8c2 100755 --- a/src/chroot-tools/librechroot +++ b/src/chroot-tools/librechroot @@ -75,10 +75,10 @@ hack_arch_nspawn_flags() { # We're running an ARM chroot on a non-ARM processor # Make sure that qemu-static is set up with binfmt_misc - if [[ $(grep -xF \ - -e 'enabled'\ + if [[ $(grep -c -xF \ + -e 'enabled' \ -e 'interpreter /usr/bin/qemu-arm-static' \ - /proc/sys/fs/binfmt_misc/arm 2>/dev/null |wc -l) -lt 2 ]]; then + /proc/sys/fs/binfmt_misc/arm 2>/dev/null) -lt 2 ]]; then error 'Cannot cross-compile for ARM on x86' plain 'This requires a binfmt_misc entry for qemu-arm-static.' prose 'Such a binfmt_misc entry is provided by the %s |