Last active
September 29, 2021 14:12
-
-
Save timlegrand/d67d502be82be7983ff1 to your computer and use it in GitHub Desktop.
Check Shell script is source, not sub-shelled
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
# If not running interactively | |
if [ -z "$PS1" ]; then echo "This script must be sourced. Use \"source ./script.sh\" instead." ; exit ; fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment