summaryrefslogtreecommitdiff
path: root/arch-nspawn.in
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@parabola.nu>2017-03-28 19:13:52 -0400
committerLuke Shumaker <lukeshu@parabola.nu>2017-05-04 21:09:14 -0400
commitbab91f854240b950f8ab9142e949391406e6a43e (patch)
tree0dece2eae59cbdb0bef104e4b31f30245fb6fbf2 /arch-nspawn.in
parent168341e04931b1203740870e57966ce0f1d19e0d (diff)
downloaddevtools32-bab91f854240b950f8ab9142e949391406e6a43e.tar.xz
Quote strings that shellcheck warns about.
These changes are all strictly "slap some double-quotes in there". Anything more than that is not included in this commit.
Diffstat (limited to 'arch-nspawn.in')
-rw-r--r--arch-nspawn.in12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch-nspawn.in b/arch-nspawn.in
index 548ebec..2d42e3a 100644
--- a/arch-nspawn.in
+++ b/arch-nspawn.in
@@ -71,7 +71,7 @@ build_mount_args() {
mount_args+=("--bind=${cache_dirs[0]}")
- for cache_dir in ${cache_dirs[@]:1}; do
+ for cache_dir in "${cache_dirs[@]:1}"; do
mount_args+=("--bind-ro=$cache_dir")
done
}
@@ -80,8 +80,8 @@ copy_hostconf () {
cp -a /etc/pacman.d/gnupg "$working_dir/etc/pacman.d"
echo "Server = $host_mirror" >"$working_dir/etc/pacman.d/mirrorlist"
- [[ -n $pac_conf ]] && cp $pac_conf "$working_dir/etc/pacman.conf"
- [[ -n $makepkg_conf ]] && cp $makepkg_conf "$working_dir/etc/makepkg.conf"
+ [[ -n $pac_conf ]] && cp "$pac_conf" "$working_dir/etc/pacman.conf"
+ [[ -n $makepkg_conf ]] && cp "$makepkg_conf" "$working_dir/etc/makepkg.conf"
local file
for file in "${files[@]}"; do
@@ -89,7 +89,7 @@ copy_hostconf () {
cp -T "$file" "$working_dir$file"
done
- sed -r "s|^#?\\s*CacheDir.+|CacheDir = $(echo -n ${cache_dirs[@]})|g" -i "$working_dir/etc/pacman.conf"
+ sed -r "s|^#?\\s*CacheDir.+|CacheDir = $(echo -n "${cache_dirs[@]}")|g" -i "$working_dir/etc/pacman.conf"
}
# }}}
@@ -98,14 +98,14 @@ umask 0022
# Sanity check
if [[ ! -f "$working_dir/.arch-chroot" ]]; then
die "'%s' does not appear to be an Arch chroot." "$working_dir"
-elif [[ $(cat "$working_dir/.arch-chroot") != $CHROOT_VERSION ]]; then
+elif [[ $(cat "$working_dir/.arch-chroot") != "$CHROOT_VERSION" ]]; then
die "chroot '%s' is not at version %s. Please rebuild." "$working_dir" "$CHROOT_VERSION"
fi
build_mount_args
copy_hostconf
-eval $(grep '^CARCH=' "$working_dir/etc/makepkg.conf")
+eval "$(grep '^CARCH=' "$working_dir/etc/makepkg.conf")"
[[ -z $nosetarch ]] || unset CARCH