diff --git a/install.sh b/install.sh index 23726ce97f..86e4de1b40 100755 --- a/install.sh +++ b/install.sh @@ -1,12 +1,17 @@ #!/usr/bin/env bash -set -eE +set -eEuo pipefail +test "${DEBUG:-}" && set -x + +# Override any user-supplied umask that could cause problems, see #1222 +umask 002 # Pre-pre-flight? 🤷 -if [[ -n "$MSYSTEM" ]]; then +if [[ -n "${MSYSTEM:-}" ]]; then echo "Seems like you are using an MSYS2-based system (such as Git Bash) which is not supported. Please use WSL instead." exit 1 fi +source install/_logging.sh source install/_lib.sh # Pre-flight. No impact yet. diff --git a/install/_lib.sh b/install/_lib.sh index e4ce0aaaa4..9abbf1a3d3 100644 --- a/install/_lib.sh +++ b/install/_lib.sh @@ -1,13 +1,3 @@ -set -euo pipefail -test "${DEBUG:-}" && set -x - -# Override any user-supplied umask that could cause problems, see #1222 -umask 002 - -# Thanks to https://unix.stackexchange.com/a/145654/108960 -log_file=sentry_install_log-$(date +'%Y-%m-%d_%H-%M-%S').txt -exec &> >(tee -a "$log_file") - # Allow `.env` overrides using the `.env.custom` file. # We pass this to docker compose in a couple places. if [[ -f .env.custom ]]; then diff --git a/install/_logging.sh b/install/_logging.sh new file mode 100644 index 0000000000..ea529dade9 --- /dev/null +++ b/install/_logging.sh @@ -0,0 +1,3 @@ +# Thanks to https://unix.stackexchange.com/a/145654/108960 +log_file=sentry_install_log-$(date +'%Y-%m-%d_%H-%M-%S').txt +exec &> >(tee -a "$log_file") diff --git a/install/dc-detect-version.sh b/install/dc-detect-version.sh index 1629736336..5acaf59c67 100644 --- a/install/dc-detect-version.sh +++ b/install/dc-detect-version.sh @@ -34,5 +34,5 @@ proxy_args="--build-arg http_proxy=${http_proxy:-} --build-arg https_proxy=${htt dcr="$dc run --pull=never --rm" dcb="$dc build $proxy_args" dbuild="docker build $proxy_args" - +echo "$dcr" echo "${_endgroup}" diff --git a/sentry-admin.sh b/sentry-admin.sh index 386b3d5701..f90af33c81 100755 --- a/sentry-admin.sh +++ b/sentry-admin.sh @@ -4,6 +4,7 @@ cd $(dirname $0) # Detect docker and platform state. +source install/_lib.sh source install/dc-detect-version.sh source install/detect-platform.sh