-
Notifications
You must be signed in to change notification settings - Fork 799
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add script to update the wrap subtree
- Loading branch information
Showing
1 changed file
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
REF=${1-master} # branch or tag; defaults to 'master' if parameter 1 not present | ||
REMOTE=wrap # just a name to identify the remote | ||
[email protected]:borglab/wrap.git # replace this with your repository URL | ||
FOLDER=wrap # where to mount the subtree | ||
|
||
git remote add $REMOTE --no-tags $REPO | ||
if [[ -d $FOLDER ]]; then # update the existing subtree | ||
git subtree pull $REMOTE $REF --prefix=$FOLDER --squash -m "Merging '$REF' into '$FOLDER'" | ||
else # add the subtree | ||
git subtree add $REMOTE $REF --prefix=$FOLDER --squash -m "Merging '$REF' into '$FOLDER'" | ||
fi | ||
git remote remove $REMOTE |