bug 1009: id variables renamed, added document_id to the document.
[elinks.git] / contrib / grafthistory.sh
blob950b385a73fa726fccfb713e89c84b6ca9086bad
1 #!/bin/sh -e
3 # Graft the ELinks development history to the current tree.
5 # Note that this will download about 80M.
7 if [ -z "`which wget 2>/dev/null`" ]; then
8 echo "Error: You need to have wget installed so that I can fetch the history." >&2
9 exit 1
12 [ "$GIT_DIR" ] || GIT_DIR=.git
13 if ! [ -d "$GIT_DIR" ]; then
14 echo "Error: You must run this from the project root (or set GIT_DIR to your .git directory)." >&2
15 exit 1
17 cd "$GIT_DIR"
19 echo "[grafthistory] Downloading the history"
20 mkdir -p objects/pack
21 cd objects/pack
22 echo "ELinks history converted from CVS. Keep this pack separate to speed up git gc." \
23 > pack-0d6c5c67aab3b9d5d9b245da5929c15d79124a48.keep
24 # pack-0d6c5c67aab3b9d5d9b245da5929c15d79124a48.idx is 3163784 bytes long.
25 # Downloading it takes less than 6 seconds here, whereas generating it
26 # with git index-pack takes over 4 minutes (750 MHz Duron, git 1.5.4.1).
27 wget -c http://elinks.cz/elinks-history.git/objects/pack/pack-0d6c5c67aab3b9d5d9b245da5929c15d79124a48.idx
28 wget -c http://elinks.cz/elinks-history.git/objects/pack/pack-0d6c5c67aab3b9d5d9b245da5929c15d79124a48.pack
30 echo "[grafthistory] Setting up the grafts"
31 cd ../..
32 mkdir -p info
33 # master
34 echo 0f6d4310ad37550be3323fab80456e4953698bf0 06135dc2b8bb7ed2e441305bdaa82048396de633 >>info/grafts
35 # REL_0_10
36 echo 43a9a406737fd22a8558c47c74b4ad04d4c92a2b 730242dcf2cdeed13eae7e8b0c5f47bb03326792 >>info/grafts
38 echo "[grafthistory] Refreshing the dumb server info wrt. new packs"
39 cd ..
40 git update-server-info