-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathinstall_win_data.sh
executable file
·66 lines (58 loc) · 1.77 KB
/
install_win_data.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
63
64
65
66
#!/bin/bash
# install minimal data for the Pro version
# must be installed after the software part
function InstData {
pkg=$1.tgz
ddir=$2
tmpdir=$(mktemp -d)
pkgz=BaseData/$pkg
if [ ! -e $pkgz ]; then
wget http://sourceforge.net/projects/virtualmoon/files/OldFiles/6-Source_Data/$pkg/download -O $pkgz
fi
tar xvzf $pkgz -C $tmpdir
cp -a $tmpdir/share/virtualmoon/* $ddir/
rm -rf $tmpdir/share/virtualmoon/*
rmdir $tmpdir/share/virtualmoon
rmdir $tmpdir/share
rmdir $tmpdir
}
function InstPicture {
pkg=$1.tgz
ddir=$2
tmpdir=$(mktemp -d)
pkgz=BaseData/$pkg
if [ ! -e $pkgz ]; then
wget http://sourceforge.net/projects/virtualmoon/files/OldFiles/6-Source_Data/$pkg/download -O $pkgz
fi
tar xvzf $pkgz -C $tmpdir
cp -a $tmpdir/share/virtualmoon/* $ddir/
rm -rf $tmpdir/share/virtualmoon/*
rmdir $tmpdir/share/virtualmoon
rmdir $tmpdir/share
rmdir $tmpdir
}
destdir=$1
if [ -z "$destdir" ]; then
export destdir=/tmp/virtualmoon
fi
echo Install virtualmoon data to $destdir
install -m 755 -d $destdir
install -m 755 -d $destdir/Database
install -v -m 644 Database/glossary_uEN.csv $destdir/Database/
install -v -m 644 Database/glossary_uFR.csv $destdir/Database/
install -v -m 644 Database/licence.txt $destdir/Database/
install -v -m 644 Database/lopamidx.csv $destdir/Database/
install -v -m 644 Database/lopamidx.txt $destdir/Database/
install -v -m 644 Database/weblun.csv $destdir/Database/
# big data
InstData Base_Doc $destdir
InstData Base_Database $destdir
InstData Base_JPLeph $destdir
InstData Base_Kernels $destdir
InstData Base_Dem $destdir
InstData Base_WAC_LOWSUN $destdir
InstData Base_Change $destdir
InstData Base_Overlay $destdir
InstData Base_Historical $destdir
InstPicture PictureApollo $destdir
InstPicture PictureProbes $destdir