lots: shellcheck, streaming stuff, fixes
[distro-setup] / zboot
diff --git a/zboot b/zboot
index bf9c7c25a32b29c80ddf3317fa6d7c58913b1e53..082afb5b4e03f5cff318637a7b0e6c276823d13a 100755 (executable)
--- a/zboot
+++ b/zboot
@@ -1,7 +1,6 @@
 #!/bin/bash
 
-script=$(readlink -f -- "$BASH_SOURCE")
-[[ $EUID == 0 ]] || exec sudo -E "$script" "$@"
+[[ $EUID == 0 ]] || exec sudo -E "${BASH_SOURCE[0]}" "$@"
 
 set -e; . /usr/local/lib/bash-bear; set +e
 
@@ -33,7 +32,7 @@ mount -o bind /dev dev
 mount -o bind /proc proc
 mount -o bind /sys sys
 mkdir -p boot/efi
-mount $(awk '$2 == "/boot/efi" {print $1}' /etc/mtab) boot/efi
+mount "$(awk '$2 == "/boot/efi" {print $1}' /etc/mtab)" boot/efi
 
 cp /b/ds/zboot-chroot ./root