Skip to content

Instantly share code, notes, and snippets.

@xSavitar
Last active June 14, 2021 20:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xSavitar/eeb84394d9a86ad98fd966b0caa3980a to your computer and use it in GitHub Desktop.
Save xSavitar/eeb84394d9a86ad98fd966b0caa3980a to your computer and use it in GitHub Desktop.
Recursively update all (with `git pull`) sub-directories (upstreams) in a parent directory (assuming many sub-directories).
#!/bin/bash
for dir in *; do
if [ -d "$dir" ]; then
echo -e "\nUpdating $dir extension, please wait...\n";
(cd "$dir" && git pull origin master)
echo -e "\n$dir extension updated..."
fi
done
echo -e "\n\nWell done, all directories updated :)"d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment