Created
October 8, 2014 13:38
-
-
Save phadej/fceb97a593e3644327e8 to your computer and use it in GitHub Desktop.
Simple clean environment
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
# Example configuration | |
export PATH=/usr/bin | |
export FOO=1 | |
export BAR=2 |
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 | |
# Run next stage in empty environment | |
/usr/bin/env -i /bin/bash stage2.sh $1 |
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
# Populate env with configuration | |
source $1 | |
# Next stage | |
/bin/bash stage3.sh |
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
# Example last stage: | |
echo $FOO $BAR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment