Created
May 19, 2021 18:20
-
-
Save lucaswinningham/79d44e8059fa556c994206939accf7df to your computer and use it in GitHub Desktop.
Revisions
-
lucaswinningham created this gist
May 19, 2021 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ ```bash #!/usr/bin/env bash this_dir="${BASH_SOURCE%/*}" # Recursively iterates over directories looking for .sh files sourcing them if they exist for executable in $(find "$this_dir" -regex ".*\.sh"); do [ -f "$executable" ] && source "$executable" done unset this_dir ```