forked from jwiegley/subconvert
/
update.sh
executable file
·62 lines (47 loc) · 1.63 KB
/
update.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/bash -x
set -o errexit
WORKSPACE="$(pwd)"
RAMDISK="$WORKSPACE/ramdisk" # ideally this really *would* be on a ramdisk
SUBCONVERT="$WORKSPACE/../subconvert"
SCRIPTS="$SUBCONVERT/subconvert/bin"
DOC="$SUBCONVERT/subconvert/doc"
#(cd "$WORKSPACE/mirrors/modularized"
# && git status --porcelain | awk '{print $2}' | xargs rm -fr)
#(cd boost-git; git reset --hard HEAD; git pull; \
# git submodule foreach "git reset --hard HEAD"; \
# git submodule update --init)
# (cd boost-private; git pull)
# (cd boost-svn; git pull)
# (cd Boost.Defrag; git pull)
# (cd installer; git pull)
# (cd ryppl; git pull)
# (cd boost-modularize; git pull)
# perl -i -pe "s%url =.*%url = file://$PWD/boost.svnrepo%;" boost-clone/.git/config
# (cd boost-clone; git svn fetch; git reset --hard trunk)
mkdir -p $RAMDISK/cpp
if [[ -d $RAMDISK/cpp ]]; then
/bin/rm -fr $RAMDISK/cpp
mkdir $RAMDISK/cpp
cd $RAMDISK/cpp
git init
export LD_LIBRARY_PATH="$SUBCONVERT/prefix/lib"
"$SUBCONVERT/prefix/bin/subconvert" \
-A "$DOC/authors.txt" \
-B "$DOC/branches.txt" \
-M "$DOC/modules.txt" \
convert /home/svnsync/dump/boost.svndump
git symbolic-ref HEAD refs/heads/trunk
git prune
sleep 5
git remote add origin git@github.com:ryppl/boost-history.git
git push -f --all origin
git push -f --mirror origin
git push -f --tags origin
sleep 5
rsync -av --delete .git/ $WORKSPACE/boost-history.git/
cd $WORKSPACE
# sudo umount $RAMDISK
rm -fr $RAMDISK
fi
fi
echo "Done!"