summaryrefslogtreecommitdiffstats
path: root/third_party/sqlite/google_update_sqlite.sh
blob: d9009d53bd7698a76212fc56784a681008b27f99 (plain)
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
#!/bin/bash
#
# A simple script to make it easier to merge in newer versions of sqlite.
# It may not work perfectly, in which case, it at least serves as an outline
# of the procedure to follow.

if [ "$1" = "" ]; then
  echo "Usage: $0 <Date to pull from CVS> [<merge tool>]"
  echo "Example: $0 '2007/01/24 09:54:56'"
  exit 1
fi

if [ "$2" = "" ]; then
  MERGE="kdiff3 -m"
fi

BASE_DATE=`cat VERSION_DATE`
NEW_DATE="$1"

cd ..
echo "_____ Logging in to sqlite.org cvs (log in as anonymous)..."
cvs -d :pserver:anonymous@www.sqlite.org:/sqlite login
cvs -d :pserver:anonymous@www.sqlite.org:/sqlite checkout -P -D "$BASE_DATE" -d sqlite-base sqlite
cvs -d :pserver:anonymous@www.sqlite.org:/sqlite checkout -P -D "$NEW_DATE" -d sqlite-latest sqlite

echo "_____ Running merge tool..."
$MERGE sqlite-base sqlite-latest sqlite

cd sqlite

echo "_____ Updating VERSION_DATE to be $NEW_DATE ..."
echo $NEW_DATE > VERSION_DATE

echo "_____ Processing generated files..."
./google_generate_preprocessed.sh