Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Commit

Permalink
Prepare to do our work on a RAMDisk this time
Browse files Browse the repository at this point in the history
  • Loading branch information
dabrahams committed Jan 14, 2013
1 parent 30c1158 commit 01b4d88
Showing 1 changed file with 31 additions and 34 deletions.
65 changes: 31 additions & 34 deletions bin/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -o errexit

WORKSPACE="$(pwd)"
RAMDISK="$WORKSPACE/ramdisk" # ideally this really *would* be on a ramdisk
RAMDISK="/tmp/jenkins-subconvert" # /tmp is expected to be a ramdisk
SUBCONVERT="$WORKSPACE/../subconvert"
SCRIPTS="$SUBCONVERT/subconvert/bin"
DOC="$SUBCONVERT/subconvert/doc"
Expand All @@ -24,39 +24,36 @@ DOC="$SUBCONVERT/subconvert/doc"
# 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

mkdir -p "$RAMDISK"
chmod 700 "$RAMDISK"
if [[ ! -d "$RAMDISK/cpp" ]]; then
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
cd "$RAMDISK/cpp"

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

echo "Done!"
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 to persistent storage. Give ETA updates every 2s
rsync -aix --delete .git/ $WORKSPACE/boost-history.git/ | pv -le -s "$(du -d 0 boost-zero/ | cut -f 1)" > /dev/null

cd $WORKSPACE
fi

0 comments on commit 01b4d88

Please sign in to comment.