Created
June 22, 2017 00:44
-
-
Save xywei/0f5266dc112c2fbdebc456f9be724220 to your computer and use it in GitHub Desktop.
Update TeXmacs Git mirror
This file contains hidden or 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
#!/bin/sh | |
# to create the repo, see https://gist.github.com/ticean/1556967 | |
REPO_PATH=$HOME/texmacs | |
# master branch | |
cd $REPO_PATH | |
git checkout master | |
git svn fetch | |
git svn rebase | |
git push origin master | |
# experimental: all SVN branches | |
# https://stackoverflow.com/questions/9606675/migrate-from-subversion-to-git-clone-all-branches-and-push-through-gitolite | |
PUSH_COMMANDS=$HOME/texmacs_push_commands.sh | |
rm -f $PUSH_COMMANDS | |
echo "cd $REPO_PATH" >> $PUSH_COMMANDS | |
printf "git push origin " >> $PUSH_COMMANDS | |
git show-ref | grep refs/remotes | grep -v '@' | grep -v remotes/tags | perl -ne 'print "refs/remotes/$1:refs/heads/$1 " if m!refs/remotes/(.*)!' >> $PUSH_COMMANDS | |
echo >> $PUSH_COMMANDS | |
printf "git push origin " >> $PUSH_COMMANDS | |
git show-ref | grep refs/remotes/tags | grep -v '@' | perl -ne 'print "refs/remotes/tags/$1:refs/tags/$1 " if m!refs/remotes/tags/(.*)!' >> $PUSH_COMMANDS | |
chmod +x $PUSH_COMMANDS | |
$PUSH_COMMANDS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment