Created
September 22, 2018 19:29
-
-
Save kodopik/dcf562c05c70ed5c3b7935cd1af6e39d to your computer and use it in GitHub Desktop.
Bash header - https://habr.com/post/413117/
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
#!/usr/bin/env bash | |
# https://habr.com/post/413117/ | |
if test "$BASH" = "" || "$BASH" -uc "a=();true \"\${a[@]}\"" 2>/dev/null; then | |
# Bash 4.4, Zsh | |
set -euo pipefail | |
else | |
# Bash 4.3 and older chokes on empty arrays with set -u. | |
set -eo pipefail | |
fi | |
shopt -s nullglob globstar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment