blob: a9e02991e1b97b009bce1a8322ac3ea313479443 (
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
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
#! /usr/bin/env bash
# Unpack ODB distribution for Windows.
#
# -mingw unpack for MinGW
#
trap 'exit 1' ERR
function error ()
{
echo "$*" 1>&2
}
databases="mssql oracle pgsql sqlite mysql"
mingw=n
while [ $# -gt 0 ]; do
case $1 in
-mingw)
mingw=y
shift
;;
*)
error "unknown option: $1"
exit 1
;;
esac
done
if [ $mingw = y ]; then
base=/t/pack
else
base=/cygdrive/t/pack
fi
rm -rf libodb libodb-mssql libodb-oracle libodb-pgsql libodb-sqlite \
libodb-mysql libodb-boost libodb-qt odb odb-tests odb-examples \
odb-tests-* odb-examples-*
v=`echo $base/odb-*-*-*.zip | sed -e "s%$base/odb-\([^-]*\).*.zip%\1%"`
mv=`echo $v | sed -e 's%\([0-9]*\.[0-9]*\).*%\1%'`
echo unpacking $mv from $base
unzip -q $base/libodb-$mv.*.zip
mv libodb-$mv.*/ libodb
unzip -q $base/libodb-mssql-$mv.*.zip
mv libodb-mssql-$mv.*/ libodb-mssql
unzip -q $base/libodb-oracle-$mv.*.zip
mv libodb-oracle-$mv.*/ libodb-oracle
unzip -q $base/libodb-pgsql-$mv.*.zip
mv libodb-pgsql-$mv.*/ libodb-pgsql
unzip -q $base/libodb-sqlite-$mv.*.zip
mv libodb-sqlite-$mv.*/ libodb-sqlite
unzip -q $base/libodb-mysql-$mv.*.zip
mv libodb-mysql-$mv.*/ libodb-mysql
unzip -q $base/libodb-boost-$mv.*.zip
mv libodb-boost-$mv.*/ libodb-boost
unzip -q $base/libodb-qt-$mv.*.zip
mv libodb-qt-$mv.*/ libodb-qt
unzip -q $base/odb-tests-$mv.*.zip
if [ $mingw = n ]; then
for d in $databases; do
cp -r odb-tests-$mv.*/ odb-tests-$d
done
rm -r odb-tests-$mv.*
else
mv odb-tests-$mv.*/ odb-tests
fi
unzip -q $base/odb-examples-$mv.*.zip
if [ $mingw = n ]; then
for d in $databases; do
cp -r odb-examples-$mv.*/ odb-examples-$d
done
rm -r odb-examples-$mv.*
else
mv odb-examples-$mv.*/ odb-examples
fi
if [ $mingw = n ]; then
unzip -q $base/odb-$v-i686-windows.zip
mv odb-$v-i686-windows odb
cp default.options odb/etc/odb/
for d in $databases; do
cp $d.options odb-tests-$d/
cp $d-driver.bat odb-tests-$d/
cp $d.options odb-examples-$d/
cp $d-driver.bat odb-examples-$d/
done
fi
|