Skip to content

Commit

Permalink
Organize install.sh a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwhitacre committed Jan 6, 2022
1 parent c48efe0 commit 2b9a179
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
9 changes: 6 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 3 additions & 0 deletions install/_lib.sh
Original file line number Diff line number Diff line change
@@ -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")
Expand Down

0 comments on commit 2b9a179

Please sign in to comment.