X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=mk-basefile-big;h=1a6b6a99bc70dc28b12b157a34967c11ab7c0a7d;hb=fd75a734a7149cf203553d36270482af37e680da;hp=95d2e9f2cd51f1e9f086f5a29ed405be05ffffbd;hpb=a69dd442e7381deaec866989a4944efa4f73a8c3;p=automated-distro-installer diff --git a/mk-basefile-big b/mk-basefile-big index 95d2e9f..1a6b6a9 100755 --- a/mk-basefile-big +++ b/mk-basefile-big @@ -16,11 +16,13 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -[[ $EUID == 0 ]] || exec sudo -E "$BASH_SOURCE" "$@" +[[ $EUID == 0 ]] || exec sudo -E "${BASH_SOURCE[0]}" "$@" +set -e; . /usr/local/lib/bash-bear; set +e -x="$(readlink -f "$BASH_SOURCE")"; source "${x%/*}/bash-trace" -x="$(readlink -f -- "$BASH_SOURCE")"; PATH="${x%/*}:$PATH" # directory of this file +this_file="$(readlink -f -- "${BASH_SOURCE[0]}")" +readonly this_file this_dir="${this_file%/*}" +PATH="$this_dir:$PATH" # directory of this file usage() { cat < /srv/fai/config/class/51-multi-boot rm -rf $t; mkdir -p $t +# shellcheck disable=SC1007 # intentional LANG= fai -N -u hostname_does_not_matter dirinstall $t # Turn a dirinstall into a basefile. taken from mk-basefile