Merge pull request #485 from borglab/feature/wrap_update_script
Add script to update the wrap subtreerelease/4.3a0
						commit
						60a948aeba
					
				| 
						 | 
				
			
			@ -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
 | 
			
		||||
REPO=git@github.com: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
 | 
			
		||||
		Loading…
	
		Reference in New Issue