/[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 3166 by torben, Wed Dec 14 13:26:40 2016 UTC revision 3167 by torben, Wed Dec 14 14:10:47 2016 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2    
3    # Note
4    # 3 GB memory (ram+swap) MUST be available when compiling
5    
 DATADIR=/mnt/qnap/openstreetmap  
6    
7  if [ ! -f /usr/local/bin/osrm-extract ] ; then  TAG="v5.4.0"
8    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  DATADIR=/mnt/qnap/openstreetmap
   apt-get install libxml2-dev libzip-dev libboost-all-dev lua5.1 liblua5.1-0-dev libluabind-dev  libtbb-dev  
9    
10    if [ ! -d "$DATADIR" ] ; then
11            echo DATADIR not found
12            exit
13    fi
14    
15    cd /root  if [ ! -f /usr/local/bin/osrm-extract ] ; then
16      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
17      apt-get install libxml2-dev libzip-dev libboost-all-dev lua5.1 liblua5.1-0-dev libluabind-dev  libtbb-dev ||exit
18    
   git clone https://github.com/Project-OSRM/osrm-backend.git  
   cd osrm-backend  
   mkdir -p build  
   cd build  
19    
20    cmake ..    cd /root || exit
21    make -j 2  
22    make install    if [ ! -d osrm-backend ] ; then
23        git clone https://github.com/Project-OSRM/osrm-backend.git || exit
24        cd osrm-backend || exit
25        git checkout tags/$TAG || exit
26      else
27        cd osrm-backend
28      fi
29    
30      if [ ! -d build ] ; then
31        mkdir -p build || exit
32      fi
33    
34      cd build ||exit
35    
36      #If building on Debian8/jessie LTO is apparently broken
37      cmake -DENABLE_LTO=OFF .. || exit
38      make -j 2 || exit
39      make install ||exit
40  fi  fi
41    
42    
# Line 27  fi Line 46  fi
46  cd $DATADIR  cd $DATADIR
47    
48  if [ ! -f denmark-latest.osm ] ; then  if [ ! -f denmark-latest.osm ] ; then
49          wget http://download.geofabrik.de/europe/denmark-latest.osm.bz2          wget http://download.geofabrik.de/europe/denmark-latest.osm.bz2 || exit
50          bunzip2 denmark-latest.osm.bz2          bunzip2 denmark-latest.osm.bz2 ||exit
51  fi  fi
52    
53    
54  cd /root/osrm-backend  cd /root/osrm-backend
55    
56  if [ ! -f $DATADIR/denmark-latest.osrm ] ; then  if [ ! -f $DATADIR/denmark-latest.osrm ] ; then
57          osrm-extract $DATADIR/denmark-latest.osm          osrm-extract $DATADIR/denmark-latest.osm || exit
58  fi  fi
59    
60  if [ ! -f $DATADIR/denmark-latest.osrm.edges ] ; then  if [ ! -f $DATADIR/denmark-latest.osrm.edges ] ; then
61          osrm-prepare $DATADIR/denmark-latest.osrm          osrm-prepare $DATADIR/denmark-latest.osrm || exit
62  fi  fi
63    
64  cd $DATADIR  cd $DATADIR

Legend:
Removed from v.3166  
changed lines
  Added in v.3167

  ViewVC Help
Powered by ViewVC 1.1.20