X-Git-Url: https://iankelling.org/git/?p=distro-setup;a=blobdiff_plain;f=zboot-chroot;fp=zboot-chroot;h=0a682086d0c4b119c7e99bd2a7a8d88ad5e650b4;hp=4411cc48c36c4bb944e358ed70b40d5f019e7bcb;hb=d67edcdca8795a4bca116aa532d02dda246a6f53;hpb=a9e3d60b4254cd5c6216c4b3e7f8cd5cc5107fad diff --git a/zboot-chroot b/zboot-chroot index 4411cc4..0a68208 100755 --- a/zboot-chroot +++ b/zboot-chroot @@ -1,6 +1,6 @@ #!/bin/bash -[[ $EUID == 0 ]] || exec sudo -E "$script" "$@" +[[ $EUID == 0 ]] || exec sudo -E "${BASH_SOURCE[0]}" "$@" if ! test "$BASH_VERSION"; then echo "error: shell is not bash" >&2; exit 1; fi shopt -s inherit_errexit 2>/dev/null ||: # ignore fail in bash < 4.4