various improvements
[distro-setup] / dall
1 #!/bin/bash
2
3 if ! test "$BASH_VERSION"; then echo "error: shell is not bash" >&2; exit 1; fi
4 shopt -s inherit_errexit 2>/dev/null ||: # ignore fail in bash < 4.4
5 set -eE -o pipefail
6 trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" exit status: $?, PIPESTATUS: ${PIPESTATUS[*]}" >&2' ERR
7
8 readonly this_file="$(readlink -f -- "${BASH_SOURCE[0]}")"
9 readonly this_dir="${this_file%/*}"
10 cd "$this_dir"
11 ./distro-begin
12 ./distro-end