Advertisement
Guest User

Run git pull over all subdirectories

a guest
Jun 9th, 2015
484
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.32 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. ls -d */ | parallel -I{} -j100 '
  4.  
  5.  export PS4="`tput setaf 3`>>> `tput sgr0`"      # output lines as executed in colored intended style
  6.  set -x                                          # verbose output (print each line as it is executed)
  7.  
  8.  if [ -d {}/.git ]; then
  9.    git -C {} pull > /dev/null
  10.  fi
  11. '
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement