diff options
Diffstat (limited to 'migrate-scripts')
-rw-r--r-- | migrate-scripts | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/migrate-scripts b/migrate-scripts new file mode 100644 index 0000000..d368ca2 --- /dev/null +++ b/migrate-scripts @@ -0,0 +1,40 @@ +#!/bin/sh +# +# Mas repo creator! +# +# This script was used to migrate lots of scripts to specific repositories. + +# New repositories +REPOS="bash-prompt downloaders git-subtree playlister sedscripts ssl-wrapper start-streaming termplex timelog unisyncer utils-battery utils-calendar utils-cdrecord utils-chroot utils-git utils-gpg utils-image utils-mail utils-spreadsheet utils-ssh utils-tor utils-x11 vbox" + +# First stage +for repo in $REPOS; do + cd ~/apps/$repo + touch {README,TODO}.md + git init + git add . + git config user.name "USER" + git config user.email "MAIL" + git remote add DEST1 gitolite@DEST1:$repo.git + git remote add DEST2 gitolite@DEST2:$repo.git + git commit -m "Initial import" + git push DEST1 master + git push DEST2 master + + # Remote all + echo '[remote "all"]' >> .git/config + echo ' url = gitolite@DEST1:$repo.git' >> .git/config + echo ' url = gitolite@DEST2:$repo.git' >> .git/config + + cd ~/apps + mkdir -p tmp + mv $repo tmp/ + git submodule add git://git.sarava.org/$repo $repo + + rm -rf $repo + mv tmp/$repo . + rm -rf .git/modules/$repo +done + +# Teardown +rmdir tmp |