X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;ds=inline;f=zboot;h=082afb5b4e03f5cff318637a7b0e6c276823d13a;hb=d67edcdca8795a4bca116aa532d02dda246a6f53;hp=4e4edce21a7ad5a97a6da4e9fcb0d7469b36fd6b;hpb=7b47d6a266340223e78317cfe0570868f45a4cad;p=distro-setup diff --git a/zboot b/zboot index 4e4edce..082afb5 100755 --- a/zboot +++ b/zboot @@ -1,9 +1,8 @@ #!/bin/bash -script=$(readlink -f -- "$BASH_SOURCE") -[[ $EUID == 0 ]] || exec sudo -E "$script" "$@" +[[ $EUID == 0 ]] || exec sudo -E "${BASH_SOURCE[0]}" "$@" -source /usr/local/lib/err +set -e; . /usr/local/lib/bash-bear; set +e # Explaining this whole thing. The host amy is used by someone else, @@ -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