blob: 15120f89e98d6d38479c126173e3febfe974d06a (
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
|
#!/bin/sh
#
# AGL Navigation mapdata download scripts
#
#--------------------------------------------------------------
help()
{
bn=`basename $0`
cat << EOF
usage
host: sudo $bn 'target_rootfs_path/'
target : $bn /
EOF
}
#-check para-------------------------------------------------------
shift `expr $OPTIND - 1`
if [ $# != 1 ]; then
help
exit
fi
rootfs=$1
#----------------------------------------------------------------
# check the if root? ------------------------------
userid=`id -u`
if [ $userid -ne "0" ]; then
echo "you're not root? run with sudo"
exit
fi
if [ ! -e $1 ]; then
echo "rootfs:$1 not found"
exit
fi
if [ ! -f $HOME/navi_data.tar.gz ]; then
echo "no map data"
echo "start downloading..."
wget --directory-prefix=$HOME http://agl.wismobi.com/data/japan_TR9/navi_data.tar.gz
else
echo "use downloaded map data"
fi
mapdatadir=$rootfs/var/mapdata
if [ ! -d $mapdatadir ]; then
echo "map data directory does not exist"
echo "create a directory" $mapdatadir
mkdir -p $mapdatadir
else
echo "map data directory exists"
fi
tar xvzf $HOME/navi_data.tar.gz -C $mapdatadir
sync
echo "done.."
|