Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # dump SCM repos from osdrawer
- # Authors: mmu_man, mmadia
- # requires: git-svn, svnrdump
- sleepslice=120
- svnBaseURL=http://svn.osdrawer.net/
- hgBaseURL=http://hg.osdrawer.net/
- project_list_url="http://web.archive.org/web/20110723234933/http://dev.osdrawer.net/projects"
- # wget -O projects.html "$project_list_url" || exit 1
- #grep 'class="project "' projects.html | sed 's,.*/projects/,,;s,".*,,' > projects.txt
- svnProjects="\
- beezer\
- befar\
- beget\
- behappy\
- benes\
- berexx\
- bescreencapture\
- beshare\
- betex\
- betick\
- bme\
- burnitnow\
- bweathertt\
- caya-gpl-protocols\
- caya\
- clipup\
- clockwerk\
- colors\
- contacts-kit\
- copynametoclipboard\
- cupshaiku\
- dockbert\
- driveencryption\
- ducksaver\
- etoolkit\
- fakevideoplugin\
- feedkit\
- finance\
- gmn\
- haiku-api-examples\
- haiku-l10n\
- haiku-mono\
- haiku-on-a-stick\
- haiku-wifi\
- haikubuildomatic\
- hare\
- hexkeycode\
- imkit\
- infopopper\
- internalmidi\
- jabber4beos\
- jammin\
- joystickutilizer\
- kirilla\
- lava\
- libwalter\
- minimizeall\
- mmu-sp-plugins\
- niue\
- paragraph\
- pecobeat\
- pecorename\
- perl-haiku-kits\
- photograbber\
- projectconcept\
- qt-beos\
- rename\
- restartdaemon\
- scannerbe\
- scrittore\
- sheepsaver\
- shredder\
- simplyvorbis\
- sum-it\
- takenotes\
- thememanager\
- trackergrep\
- trackerscript\
- universalscroller\
- vbl\
- vmwaddons\
- vncviewer\
- whisperbenet\
- wolle\
- wx-haiku\
- xraydock\
- zetareinstaller\
- "
- hgProjects="\
- bel4ka\
- bezilla\
- codecreator\
- cups\
- hd44780\
- hyperstudio\
- osdrawer\
- osdrawer-redmine\
- pe-editor\
- q3-for-haiku\
- rtcw-for-haiku\
- sane\
- serviceskit\
- "
- #XXX:DEBUG
- #echo "behappy" > projects.txt
- coffee() {
- echo '### Coffee break'
- sync
- sleep $sleepslice
- }
- owd="$PWD"
- for p in $svnProjects $hgProjects; do
- test -e "$p/.done" && continue
- echo "### Trying to mirror project '$p'..."
- mkdir -p "$p"
- cd "$p"
- # test for an svn repos
- svnurl="$svnBaseURL$p"
- if wget -q -O /dev/null "$svnurl"; then
- echo "### Projet '$p' has an svn"
- echo "### Dumping..."
- # make a dump
- svnrdump dump "$svnurl" > svn.dump || echo "${p}-svn-dump" >> failed
- #echo "Loading dump to local copy..."
- #mkdir svn-copy
- #svnrdump load "file://$PWD/svn-copy" < svn.dump || read
- echo "### Compressing dump..."
- bzip2 svn.dump
- #mkdir svn-copy
- #cd svn-copy
- # first make an svn master copy
- #python ../../svn2svn.py -a "http://svn.osdrawer.net/$p" "file://$PWD"
- #cd ..
- # now make 2 git clones, one assuming normal branches, one without
- coffee
- echo "### Making a git-svn clone (with std branches)..."
- git svn clone -s --preserve-empty-dirs -- "$svnurl" svn-clone-branches || echo "${p}-svn-git-std" >> failed
- echo "### converting svn:ignore to .gitignore..."
- (cd svn-clone-branches; git svn show-ignore > .gitignore)
- coffee
- echo "### Making a git-svn clone (full)..."
- git svn clone --preserve-empty-dirs -- "$svnurl" svn-clone-full || echo "${p}-svn-git-full" >> failed
- echo "### converting svn:ignore to .gitignore..."
- (cd svn-clone-full; git svn show-ignore > .gitignore)
- touch ".done"
- else
- echo "### Projet '$p' has no svn"
- fi
- coffee
- # test for an svn repos
- hgurl="$hgBaseURL$p"
- if wget -q -O /dev/null "$hgurl"; then
- echo "### Projet '$p' has an hg"
- echo "### Making an hg clone..."
- hg clone "$hgurl" "hg-clone" || echo "${p}-hg" >> failed ;
- touch ".done"
- else
- echo "### Projet '$p' has no hg"
- fi
- cd "$owd"
- #touch "$p/.done"
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement