Skip to content

Commit

Permalink
Add script to update the wrap subtree
Browse files Browse the repository at this point in the history
  • Loading branch information
ProfFan committed Aug 20, 2020
1 parent 77a6ed4 commit cded12e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions update_wrap.sh
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

0 comments on commit cded12e

Please sign in to comment.