<commit_before>#!/bin/sh
###############################################################
#
# Purpose: Installation of pgRouting on Ubuntu 11.04
# Authors: <NAME> <<EMAIL>>
#          <NAME> <<EMAIL>>
#
# Copyright (c) 2011-2016 Open Source Geospatial Foundation (OSGeo)
# Licensed under the GNU LGPL version >= 2.1.
#
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation, either version 2.1 of the License,
# or any later version.  This library is distributed in the hope that
# it will be useful, but WITHOUT ANY WARRANTY, without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Lesser General Public License for more details, either
# in the "LICENSE.LGPL.txt" file distributed with this software or at
# web page "http://www.fsf.org/licenses/lgpl.html".
#
#
# About:
# =====
# This script will install the following software
#       - pgRouting library
#       - osm2pgrouting converter
#       - pgRouting workshop
#
# NOTE: To make use of OSM sample data "install_osm.sh" should be run first  
#       Import of OSM sample data and converter can take some time   

./diskspace_probe.sh "`basename $0`" begin
BUILD_DIR=`pwd`
####


if [ -z "$USER_NAME" ] ; then
   USER_NAME="user"
fi
USER_HOME="/home/$USER_NAME"

TMP="/tmp/build_pgrouting"
OSM_FILE="/usr/local/share/data/osm/feature_city_CBD.osm.bz2"
OSM_DB="pgrouting"

# Add pgRouting launchpad repository
# TODO: switch from "unstable" to "stable" when repository is updated

# TODO: Remove third party PPAs
#add-apt-repository -y ppa:georepublic/pgrouting
apt-get update -qq

# Install pgRouting packages
apt-get install -y -qq postgresql-9.5-pgrouting
	
if [ $? -ne 0 ] ; then
   echo 'ERROR: pgRouting Package install failed! Aborting.'
   exit 1
fi

# Install osm2pgrouting package
apt-get install -y -qq osm2pgrouting

# Install workshop material
# TODO: not packaged yet
#apt-get install -y -qq pgrouting-workshop

# Create tmp folders
mkdir -p "$TMP" && cd "$TMP"

# create $OSM_DB database
echo "create $OSM_DB database with PostGIS and pgRouting"<commit_msg>just remove the _CBD form of the feature_city<commit_after>#!/bin/sh
###############################################################
#
# Purpose: Installation of pgRouting on Ubuntu 11.04
# Authors: <NAME> <<EMAIL>>
#          <NAME> <<EMAIL>>
#
# Copyright (c) 2011-2016 Open Source Geospatial Foundation (OSGeo)
# Licensed under the GNU LGPL version >= 2.1.
#
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation, either version 2.1 of the License,
# or any later version.  This library is distributed in the hope that
# it will be useful, but WITHOUT ANY WARRANTY, without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Lesser General Public License for more details, either
# in the "LICENSE.LGPL.txt" file distributed with this software or at
# web page "http://www.fsf.org/licenses/lgpl.html".
#
#
# About:
# =====
# This script will install the following software
#       - pgRouting library
#       - osm2pgrouting converter
#       - pgRouting workshop
#
# NOTE: To make use of OSM sample data "install_osm.sh" should be run first  
#       Import of OSM sample data and converter can take some time   

./diskspace_probe.sh "`basename $0`" begin
BUILD_DIR=`pwd`
####


if [ -z "$USER_NAME" ] ; then
   USER_NAME="user"
fi
USER_HOME="/home/$USER_NAME"

TMP="/tmp/build_pgrouting"
OSM_FILE="/usr/local/share/data/osm/feature_city.osm.bz2"
OSM_DB="pgrouting"

# Add pgRouting launchpad repository
# TODO: switch from "unstable" to "stable" when repository is updated

# TODO: Remove third party PPAs
#add-apt-repository -y ppa:georepublic/pgrouting
apt-get update -qq

# Install pgRouting packages
apt-get install -y -qq postgresql-9.5-pgrouting
	
if [ $? -ne 0 ] ; then
   echo 'ERROR: pgRouting Package install failed! Aborting.'
   exit 1
fi

# Install osm2pgrouting package
apt-get install -y -qq osm2pgrouting

# Install workshop material
# TODO: not packaged yet
#apt-get install -y -qq pgrouting-workshop

# Create tmp folders
mkdir -p "$TMP" && cd "$TMP"

# create $OSM_DB database
echo "create $OSM_DB database with PostGIS and pgRouting"
{'fraction_non_alphanumeric': 0.12263300270513977, 'fraction_numerical': 0.01127141568981064, 'mean_word_length': 4.076659038901602, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3676766', 'n_tokens_mistral': 1409, 'n_tokens_neox': 1354, 'n_words': 524}