Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

Commit

Permalink
✨ Add a sync script
Browse files Browse the repository at this point in the history
  • Loading branch information
jamieconnolly committed Aug 28, 2018
1 parent 2806f28 commit 699b645
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions libexec/handles-sync
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
# Usage: handles-sync [<target_dir>]
# Summary: Fetch from upstream and update local branches for downloaded projects

set -e

TARGET_DIR="${1-${PROJECT_HOME}}"

shopt -s nullglob
for path in "$TARGET_DIR"/**/*/.git; do
path="${path%/*}"
echo "==> Syncing ${path#${PROJECT_HOME}/}"
cd "$path"
hub sync || true
done
shopt -u nullglob

0 comments on commit 699b645

Please sign in to comment.