<commit_before>#!/bin/sh
# Copyright (c) 2014-2016 The Open Source Geospatial Foundation.
# 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 "LGPL-2.1.txt" file distributed with this software or at
# web page "http://www.fsf.org/licenses/lgpl.html".
#
#  A script to install GRASS GIS 7.
#    written by H.Bowman <hamish_b  yahoo com>
#    GRASS homepage: http://grass.osgeo.org/
#
# This does not attempt to install QGIS-plugin infrastructure, that is
#  done in install_qgis.sh. Your QGIS packages will have to have been
#  built with grass7-enabled plugins.
#
# It assumes the GRASS 6 livedvd install script has already been run,
#  the two versions can co-exist.
#
# ***
# This script is intended to be run by the User on an existing live disc,
#  Not at build time of the disc -- that will come when grass 7.0 is
#  released and in the stable repositories. The North Carolina GRASS 7
#  sample dataset will also be downloaded and installed. A result of all
#  this is that users of a non-persistent ISO boot will have everything
#  on the RAM drive, which may be quite limited to begin with depending
#  on your computer's available RAM. Users with >2gb RAM shouldn't have
#  to worry, but those on old netbooks might. If run from a persistent VM
#  or 8gb USB things should be ok too.
# ***
#
# It should be run as the superuser (sudo).
#

# FIXME: grass version parsing

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

# live disc's username is "user"
if [ -z "$USER_NAME" ] ; then
   USER_NAME="user"
fi
USER_HOME="/home/$USER_NAME"


#### install grass 7 packages from GRASS team PPA ####

TMP_DIR=/tmp/build_grass
mkdir "$TMP_DIR"

# https://launchpad.net/~grass/+archive/grass-stable?field.series_filter=trusty
# apt-add-repository --yes ppa:grass/grass-stable
apt-get --quiet update
apt-get --yes install grass-core grass-gui grass-doc grass-dev libgdal1-1.11.3-grass

#### install desktop icon ####
sed -i -e 's/^Name=GRASS GIS$/Name=GRASS GIS 7/' \
       -e 's/^Icon=grass$/Icon=grass70/' \<commit_msg>libgdal-grass not yet in ppa<commit_after>#!/bin/sh
# Copyright (c) 2014-2016 The Open Source Geospatial Foundation.
# 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 "LGPL-2.1.txt" file distributed with this software or at
# web page "http://www.fsf.org/licenses/lgpl.html".
#
#  A script to install GRASS GIS 7.
#    written by H.Bowman <hamish_b  yahoo com>
#    GRASS homepage: http://grass.osgeo.org/
#
# This does not attempt to install QGIS-plugin infrastructure, that is
#  done in install_qgis.sh. Your QGIS packages will have to have been
#  built with grass7-enabled plugins.
#
# It assumes the GRASS 6 livedvd install script has already been run,
#  the two versions can co-exist.
#
# ***
# This script is intended to be run by the User on an existing live disc,
#  Not at build time of the disc -- that will come when grass 7.0 is
#  released and in the stable repositories. The North Carolina GRASS 7
#  sample dataset will also be downloaded and installed. A result of all
#  this is that users of a non-persistent ISO boot will have everything
#  on the RAM drive, which may be quite limited to begin with depending
#  on your computer's available RAM. Users with >2gb RAM shouldn't have
#  to worry, but those on old netbooks might. If run from a persistent VM
#  or 8gb USB things should be ok too.
# ***
#
# It should be run as the superuser (sudo).
#

# FIXME: grass version parsing

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

# live disc's username is "user"
if [ -z "$USER_NAME" ] ; then
   USER_NAME="user"
fi
USER_HOME="/home/$USER_NAME"


#### install grass 7 packages from GRASS team PPA ####

TMP_DIR=/tmp/build_grass
mkdir "$TMP_DIR"

# https://launchpad.net/~grass/+archive/grass-stable?field.series_filter=trusty
# apt-add-repository --yes ppa:grass/grass-stable
apt-get --quiet update
apt-get --yes install grass-core grass-gui grass-doc grass-dev
#TODO: libgdal1-1.11.3-grass

#### install desktop icon ####
sed -i -e 's/^Name=GRASS GIS$/Name=GRASS GIS 7/' \
       -e 's/^Icon=grass$/Icon=grass70/' \
{'fraction_non_alphanumeric': 0.09524744697564808, 'fraction_numerical': 0.012568735271013355, 'mean_word_length': 3.7821596244131457, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '72332', 'n_tokens_mistral': 1628, 'n_tokens_neox': 1525, 'n_words': 691}