/[projects]/misc/osrm-scripts/start-osrm.sh
ViewVC logotype

Diff of /misc/osrm-scripts/start-osrm.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3168 by torben, Wed Dec 14 14:20:39 2016 UTC revision 3175 by torben, Mon Dec 19 13:46:18 2016 UTC
# Line 2  Line 2 
2    
3  # Note  # Note
4  # 3 GB memory (ram+swap) MUST be available when compiling  # 3 GB memory (ram+swap) MUST be available when compiling
5    # This amount is plenty for working with denmark - but more may be required on larger areas
6    #
7    # DATADIR should have 6 GB free space for denmark
8    
9    
10  TAG="v5.4.0"  ###################################
11  DATADIR=/mnt/qnap/openstreetmap  # Exit bash if a command fails
12    set -e
13    # also exit if a part of a pipe fails
14    set -o pipefail
15    
16    
17    
18    #########################
19    
20    
21    TAG="v5.5.1"
22    DATADIR=/home/openstreetmap
23    
24  if [ ! -d "$DATADIR" ] ; then  if [ ! -d "$DATADIR" ] ; then
25          echo DATADIR not found          echo DATADIR not found .. creating
26          exit          mkdir -p $DATADIR
27  fi  fi
28    
29  if [ ! -f /usr/local/bin/osrm-extract ] ; then  if [ ! -f /usr/local/bin/osrm-extract ] ; then
30    apt-get install build-essential git cmake pkg-config libprotoc-dev  protobuf-compiler libprotobuf-dev libosmpbf-dev libpng12-dev libbz2-dev libstxxl-dev libstxxl-doc libstxxl1  || exit    apt-get install libpng-dev
31    apt-get install libxml2-dev libzip-dev libboost-all-dev lua5.1 liblua5.1-0-dev libluabind-dev  libtbb-dev ||exit    apt-get install build-essential git cmake pkg-config libprotoc-dev  protobuf-compiler libprotobuf-dev libosmpbf-dev libbz2-dev libstxxl-dev libstxxl-doc
32      apt-get install libxml2-dev libzip-dev libboost-all-dev lua5.1 liblua5.1-0-dev libluabind-dev  libtbb-dev
33    
34    
35    cd /root || exit    cd /root
36    
37    if [ ! -d osrm-backend ] ; then    if [ ! -d osrm-backend ] ; then
38      git clone https://github.com/Project-OSRM/osrm-backend.git || exit      git clone https://github.com/Project-OSRM/osrm-backend.git
39      cd osrm-backend || exit      cd osrm-backend
40      git checkout tags/$TAG || exit      git checkout tags/$TAG
41    else    else
42      cd osrm-backend      cd osrm-backend
43    fi    fi
44    
45    if [ ! -d build ] ; then    if [ ! -d build ] ; then
46      mkdir -p build || exit      mkdir -p build
47    fi    fi
48    
49    cd build ||exit    cd build
50    
51    #If building on Debian8/jessie LTO is apparently broken    #If building on Debian8/jessie LTO is apparently broken
52    cmake -DENABLE_LTO=OFF .. || exit    cmake -DENABLE_LTO=OFF ..
53    make -j 2 || exit    make -j 2
54    make install ||exit    make install
55  fi  fi
56    
57    
# Line 46  fi Line 61  fi
61  cd $DATADIR  cd $DATADIR
62    
63  if [ ! -f denmark-latest.osm ] ; then  if [ ! -f denmark-latest.osm ] ; then
64          wget http://download.geofabrik.de/europe/denmark-latest.osm.bz2 || exit          wget http://download.geofabrik.de/europe/denmark-latest.osm.bz2
65          bunzip2 denmark-latest.osm.bz2 ||exit          bunzip2 denmark-latest.osm.bz2
66  fi  fi
67    
68    
69  cd /root/osrm-backend  cd /root/osrm-backend
70    
71  if [ ! -f $DATADIR/denmark-latest.osrm ] ; then  if [ ! -f $DATADIR/denmark-latest.osrm ] ; then
72          osrm-extract $DATADIR/denmark-latest.osm || exit          osrm-extract $DATADIR/denmark-latest.osm
73  fi  fi
74    
75  if [ ! -f $DATADIR/denmark-latest.osrm.hsgr ] ; then  if [ ! -f $DATADIR/denmark-latest.osrm.hsgr ] ; then
76          osrm-contract $DATADIR/denmark-latest.osrm || exit          osrm-contract $DATADIR/denmark-latest.osrm
77  fi  fi
78    
79  cd $DATADIR  cd $DATADIR

Legend:
Removed from v.3168  
changed lines
  Added in v.3175

  ViewVC Help
Powered by ViewVC 1.1.20