#!/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
Created
May 19, 2021 18:20
-
-
Save lucaswinningham/79d44e8059fa556c994206939accf7df to your computer and use it in GitHub Desktop.
Recursively source bash files
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment