From 2b9a179270763a2919304fc0337fb2c307a499c0 Mon Sep 17 00:00:00 2001 From: Chad Whitacre Date: Thu, 6 Jan 2022 08:57:44 -0500 Subject: [PATCH] Organize install.sh a bit --- install.sh | 9 ++++++--- install/_lib.sh | 3 +++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index cb39b41851..714856e1e9 100755 --- a/install.sh +++ b/install.sh @@ -1,20 +1,23 @@ #!/usr/bin/env bash set -e + +# Pre-pre-flight? 🤷 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 -umask 002 - source "$(dirname $0)/install/_lib.sh" # does a `cd .../install/`, among other things +# Pre-flight. No impact yet. source parse-cli.sh source dc-detect-version.sh source error-handling.sh -source turn-things-off.sh source check-latest-commit.sh source check-minimum-requirements.sh + +# Let's go! Start impacting things. +source turn-things-off.sh source create-docker-volumes.sh source ensure-files-from-examples.sh source generate-secret-key.sh diff --git a/install/_lib.sh b/install/_lib.sh index 4af14804ae..f8a104b4a0 100644 --- a/install/_lib.sh +++ b/install/_lib.sh @@ -1,6 +1,9 @@ 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")