Last active
January 26, 2021 15:03
-
-
Save armenzg/d88b0854e79063bedc70f692b1619c7d to your computer and use it in GitHub Desktop.
New way of creating log https://github.com/getsentry/bootstrap-sentry/pull/19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
# Keep a log. h/t https://stackoverflow.com/a/25319102 | |
bootstrap_sentry=$HOME/.sentry/bootstrap-sentry | |
mkdir -p $bootstrap_sentry | |
temp_file=`mktemp $bootstrap_sentry/bootstrap-sentry.log.XXX` | |
ls $temp_file | |
exec > >(tee $temp_file) | |
exec 2>&1 | |
echo "foo" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#/ Usage: bin/strap.sh [--debug] | |
#/ Install development dependencies on macOS. | |
#/ Heavily inspired by https://github.com/MikeMcQuaid/strap | |
set -e | |
# Start somewhere predictable. | |
cd $(dirname "$0") | |
# Keep a log. h/t https://stackoverflow.com/a/25319102 | |
cp bootstrap.log bootstrap.log.bak 2>/dev/null || true | |
exec > >(tee bootstrap.log) | |
exec 2>&1 | |
echo "foo" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#/ Usage: bin/strap.sh [--debug] | |
#/ Install development dependencies on macOS. | |
#/ Heavily inspired by https://github.com/MikeMcQuaid/strap | |
set -e | |
bootstrap_sentry="$HOME/.sentry/bootstrap-sentry" | |
mkdir -p "$bootstrap_sentry" | |
cd "$bootstrap_sentry" | |
# Keep a log. h/t https://stackoverflow.com/a/25319102 & create a temp file first | |
cp bootstrap.log bootstrap.log.bak 2>/dev/null || true | |
exec > >(tee bootstrap.log) | |
exec 2>&1 | |
echo "foo" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment