diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-11-07 16:38:30 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-11-07 16:38:30 -0200 |
commit | e07b797124a7c8d9127f1114ac01230e28c88bad (patch) | |
tree | df4943853910e5bcf3144b7680623cf2cca1943b /git-submodule-move-all-git-dirs | |
parent | 1fdd87c81c87368efff54d0cc318b491398a7594 (diff) | |
download | utils-git-e07b797124a7c8d9127f1114ac01230e28c88bad.tar.gz utils-git-e07b797124a7c8d9127f1114ac01230e28c88bad.tar.bz2 |
Adds git-submodule-move-all-git-dirs
Diffstat (limited to 'git-submodule-move-all-git-dirs')
-rwxr-xr-x | git-submodule-move-all-git-dirs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/git-submodule-move-all-git-dirs b/git-submodule-move-all-git-dirs new file mode 100755 index 0000000..41a7352 --- /dev/null +++ b/git-submodule-move-all-git-dirs @@ -0,0 +1,20 @@ +#!/bin/bash +# +# Call git-submodule-move-git-dir for each repository in a tree +# + +# Parameters +BASENAME="`basename $0`" + +# Checks +if [ ! -e ".git" ]; then + echo "please run this command in the top-level repository folder" + exit 1 +fi + +# If we invert find results so we begin conversion at the toplevel folders +#find -type f -name .git | tac | while read repo; do +find -type f -name .git | while read repo; do + folder="`dirname $repo`" + git-submodule-move-git-dir $folder +done |