Created
February 3, 2023 05:06
-
-
Save nker150/4b900840c254505c674fdf7d4a3f708c to your computer and use it in GitHub Desktop.
update.sh for parent directory
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
#!/bin/bash | |
function search_and_run() { | |
for dir in ./*; do | |
if [ -d "$dir" ]; then | |
cd "$dir" | |
if [ -f "$1" ]; then | |
bash "$1" | |
fi | |
search_and_run "$1" | |
cd .. | |
fi | |
done | |
} | |
search_and_run "update.sh" | |
search_and_run "clean.sh" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment