Updates linux, google SDK and all git repos

#!/bin/bash

sudo apt-get update
sudo apt-get upgrade

gcloud components update

echo "refresh git repos"
for repo in $(find ~/ -iname '.git' -print 2>/dev/null|sed 's/\.git//g'); do
  echo "$repo"
  cd "$repo"
  git pull
  if [ ! $? -eq 0 ]; then
    echo "error in repo $repo"
  fi
  echo ""
done

echo "REFRESH DONE"