#!/bin/bash
# git-update.sh

for user in ~/workspace/src/github.com/*
do
	if [[ ! $user =~ $GITHUB_USER_NAME ]]; then
		for project in $user/*
		do
			if [ -d $project/.git ]; then
				echo "git $project"
				cd $project
				if [[ $project == *base16-shell* ]]; then
					git pull --all
				else
					#statements
					git fetch --all
					git reset --hard
					git clean -df
					git merge --ff-only
					git submodule update --recursive
				fi
				echo ""
			fi
		done
	fi
done

#!/bin/bash

for user in $HOME/workspace/src/github.com/*
do
  if [[ ! $user =~ $GITHUB_USER_NAME ]]; then
    for project in $user/*
    do
      if [ -d $project/.git ]; then
        if [[ $project == *base16-shell* ]]; then
          (output=$(echo "git $project"; cd $project; git pull --all); echo "$output"; echo "") &
        else
          (output=$(echo "git $project"; \
            cd $project; \
            git fetch --all; \
            git reset --hard; \
            git clean -df; \
            git merge --ff-only; \
            git submodule update --recursive); \
            echo "$output"; echo "") &
        fi
      fi
    done
  fi
done
wait

Update to kick off background jobs for git update script
Update to kick off background jobs for git update script
