/[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 3178 by torben, Thu Dec 22 08:59:02 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    # 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  DATADIR=/mnt/qnap/openstreetmap  
10    ###################################
11    # 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.2"
22    DATADIR=/home/openstreetmap
23    
24    
25    if [ "$1" == "clean" ] ; then
26            echo Cleaning
27            rm -rf $DATADIR
28            rm -f /usr/local/bin/osrm*
29            pushd /root > /dev/null
30            rm -rf osrm-backend
31            popd > /dev/null
32    
33            exit
34    fi
35    
36    if [ ! -d "$DATADIR" ] ; then
37            echo DATADIR not found .. creating
38            mkdir -p $DATADIR
39    fi
40    
41  if [ ! -f /usr/local/bin/osrm-extract ] ; then  if [ ! -f /usr/local/bin/osrm-extract ] ; then
42    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    apt-get install libpng-dev
43      apt-get install build-essential git cmake pkg-config libprotoc-dev  protobuf-compiler libprotobuf-dev libosmpbf-dev libbz2-dev libstxxl-dev libstxxl-doc
44    apt-get install libxml2-dev libzip-dev libboost-all-dev lua5.1 liblua5.1-0-dev libluabind-dev  libtbb-dev    apt-get install libxml2-dev libzip-dev libboost-all-dev lua5.1 liblua5.1-0-dev libluabind-dev  libtbb-dev
45    
46    
47    cd /root    cd /root
48    
49      if [ ! -d osrm-backend ] ; then
50        git clone https://github.com/Project-OSRM/osrm-backend.git
51        cd osrm-backend
52        git checkout tags/$TAG
53      else
54        cd osrm-backend
55      fi
56    
57      if [ ! -d build ] ; then
58        mkdir -p build
59      fi
60    
   git clone https://github.com/Project-OSRM/osrm-backend.git  
   cd osrm-backend  
   mkdir -p build  
61    cd build    cd build
62    
63    cmake ..    #If building on Debian8/jessie LTO is apparently broken
64      cmake -DENABLE_LTO=OFF ..
65    make -j 2    make -j 2
66    make install    make install
67  fi  fi
# Line 38  if [ ! -f $DATADIR/denmark-latest.osrm ] Line 84  if [ ! -f $DATADIR/denmark-latest.osrm ]
84          osrm-extract $DATADIR/denmark-latest.osm          osrm-extract $DATADIR/denmark-latest.osm
85  fi  fi
86    
87  if [ ! -f $DATADIR/denmark-latest.osrm.edges ] ; then  if [ ! -f $DATADIR/denmark-latest.osrm.hsgr ] ; then
88          osrm-prepare $DATADIR/denmark-latest.osrm          osrm-contract $DATADIR/denmark-latest.osrm
89  fi  fi
90    
91  cd $DATADIR  cd $DATADIR

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

  ViewVC Help
Powered by ViewVC 1.1.20