2
0

homebrew.sh 481 B

1234567891011121314151617
  1. #!/bin/bash
  2. if [ ! -d "$TUNASYNC_WORKING_DIR" ]; then
  3. echo "Directory not exists, fail"
  4. exit 1
  5. fi
  6. function update_homebrew_git() {
  7. repo_dir="$1"
  8. cd $repo_dir
  9. echo "==== SYNC $repo_dir START ===="
  10. /usr/bin/timeout -s INT 3600 git remote -v update
  11. echo "==== SYNC $repo_dir DONE ===="
  12. }
  13. update_homebrew_git "$TUNASYNC_WORKING_DIR/homebrew.git"
  14. update_homebrew_git "$TUNASYNC_WORKING_DIR/homebrew-python.git"
  15. update_homebrew_git "$TUNASYNC_WORKING_DIR/homebrew-science.git"