Last active
October 15, 2023 09:31
-
-
Save zedr/00304e23343981b2db149c3968d05202 to your computer and use it in GitHub Desktop.
Bash defaults
This file contains hidden or 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 | |
set -o pipefail | |
set -o errexit | |
set -o nounset | |
dir1=${1:-} | |
dir2=${2:-} | |
usage() { | |
echo "Usage: ${0} DIR1 DIR2" | |
} | |
if [[ -z $dir1 ]] || [[ -z $dir2 ]]; then | |
usage | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment