lots: shellcheck, streaming stuff, fixes
[distro-setup] / zboot-chroot
index 4411cc48c36c4bb944e358ed70b40d5f019e7bcb..0a682086d0c4b119c7e99bd2a7a8d88ad5e650b4 100755 (executable)
@@ -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