Skip to content

Instantly share code, notes, and snippets.

@hkraji
Created February 17, 2014 13:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hkraji/9050198 to your computer and use it in GitHub Desktop.
Save hkraji/9050198 to your computer and use it in GitHub Desktop.
dtk update
#!/usr/bin/env bash
for component in "dtk-client" "dtk-common" "dtk-common-repo" "server" "dtk-repo-manager" "dtk-admin-application" "common"
do
if [ -d "$HOME/$component" ]; then
echo "Updating $HOME/$component ..."
git --git-dir="$HOME/$component/.git" --work-tree="$HOME/$component" clean -f
git --git-dir="$HOME/$component/.git" --work-tree="$HOME/$component" checkout .
git --git-dir="$HOME/$component/.git" --work-tree="$HOME/$component" pull
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment