Last active
March 29, 2019 16:01
-
-
Save eeowaa/86b45f7c6c66f854e96f2b9e5d3031aa to your computer and use it in GitHub Desktop.
Revisions
-
eeowaa revised this gist
Mar 29, 2019 . 1 changed file with 0 additions and 2 deletions.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 @@ -1,6 +1,4 @@ #!/bin/sh # XXX: Hack to get to the cwd of the parent process test "X$GIT_PREFIX" = X || cd -- "$GIT_PREFIX" -
eeowaa revised this gist
Mar 29, 2019 . No changes.There are no files selected for viewing
-
eeowaa renamed this gist
Mar 29, 2019 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
eeowaa created this gist
Mar 29, 2019 .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,31 @@ #!/bin/sh # Perform a specific git operation on every repository residing in a child # directory of the current working directory. # XXX: Hack to get to the cwd of the parent process test "X$GIT_PREFIX" = X || cd -- "$GIT_PREFIX" # Only return 0 if *everything* succeeds rc=0 # Output a nice header to separate this command from the others cat <<EOF ------------------------------------------------------------------------------- GIT BULK COMMAND STARTED: `date` ------------------------------------------------------------------------------- EOF # For each child directory containing a `.git' grandchild directory ls -d */.git | while read x do test -d "$x" || continue repo=`dirname "$x"` echo >&2 "=== $repo ===" # Navigate to that directory and do something! cd "$repo" && { git "$@" || rc=1 cd .. } || rc=1 done exit $rc