Last active
February 6, 2017 13:27
-
-
Save erickzanardo/24455a82ec98b295426dd7c9454b83de to your computer and use it in GitHub Desktop.
Simple script to easy add env variables, or changing the path without having to always change the bash[rc,_profile,etc] file. Add these lines to your bash[rc,_profile,etc] file once and then just add files to the folder configured on the SOURCEABLE_DIR variable.
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
# Sourceables | |
SOURCEABLE_DIR=/home/erick/sourceable/ | |
DIRS=($(ls $SOURCEABLE_DIR)) | |
for dir in "${DIRS[@]}"; do | |
if [[ "$dir" != *.ignore ]] | |
then | |
source "$SOURCEABLE_DIR$dir" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment