<commit_before>#!/bin/sh
#################################################
# 
# Purpose: Installation of GeoNetwork into Lubuntu
# Author:  <NAME> <<EMAIL>>
# Author:  <NAME> <<EMAIL>>
# Author:  <NAME> <<EMAIL>>
# Small edits: <NAME> <<EMAIL>>
#
#################################################
# Copyright (c) 2010-2018 Open Source Geospatial Foundation (OSGeo) and others.
# Copyright (c) 2009 GISVM.COM
#
# 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 geonetwork into OSGeo live
# stable version: v3.2.1
# based on Jetty + GeoNetwork + H2
# Installed at /usr/local/lib/geonetwork
# Port number = 8880
#
# To start geonetwork
# cd /usr/local/lib/geonetwork/bin
# ./startup.sh 
#
# To stop geonetwork
# cd /usr/local/lib/geonetwork/bin
# ./shutdown.sh
#
# To enter geonetwork, start browser with url:
# http://localhost:8880/geonetwork
#
# GeoNetwork version 3.2.1 runs with java 7 or higher.
# It can be installed into servlet containers: jetty and tomcat. Jetty is   
# bundled with the installer.

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


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

GEONETWORK_VERSION=3.2.1-0
GEONETWORK_VERSION_FOLDER=3.2.1

TMP="/tmp/build_geonetwork"
INSTALL_FOLDER="/usr/local/lib"
GEONETWORK_FOLDER="$INSTALL_FOLDER/geonetwork"
BIN="/usr/local/bin"


## Setup things... ##
 
# check required tools are installed
# (should we also verify java???)
if [ ! -x "`which wget`" ] ; then
   echo "ERROR: wget is required, please install it and try again" 
   exit 1
fi

# create tmp folders
mkdir -p "$TMP"
cd "$TMP"


# get geonetwork
if [ -f "geonetwork-install-$GEONETWORK_VERSION.jar" ]
then
   echo "geonetwork-install-$GEONETWORK_VERSION.jar has already been downloaded."
else
   wget -c --progress=dot:mega \
     "https://sourceforge.net/projects/geonetwork/files/GeoNetwork_unstable_development_versions/$GEONETWORK_VERSION_FOLDER/geonetwork-install-$GEONETWORK_VERSION.jar/download" \
     -O geonetwork-install-$GEONETWORK_VERSION.jar
fi

## Get Install config files ##
# Those files contains information about default ports
# and need to be updated to properly setup the node on the OSGeo live machine
echo "START copy of files."

FILES="
install.xml
jetty.xml<commit_msg>Caching GeoNetwork download, SF causes slow iso builds<commit_after>#!/bin/sh
#################################################
# 
# Purpose: Installation of GeoNetwork into Lubuntu
# Author:  <NAME> <<EMAIL>>
# Author:  <NAME> <<EMAIL>>
# Author:  <NAME> <<EMAIL>>
# Small edits: <NAME> <<EMAIL>>
#
#################################################
# Copyright (c) 2010-2018 Open Source Geospatial Foundation (OSGeo) and others.
# Copyright (c) 2009 GISVM.COM
#
# 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 geonetwork into OSGeo live
# stable version: v3.2.1
# based on Jetty + GeoNetwork + H2
# Installed at /usr/local/lib/geonetwork
# Port number = 8880
#
# To start geonetwork
# cd /usr/local/lib/geonetwork/bin
# ./startup.sh 
#
# To stop geonetwork
# cd /usr/local/lib/geonetwork/bin
# ./shutdown.sh
#
# To enter geonetwork, start browser with url:
# http://localhost:8880/geonetwork
#
# GeoNetwork version 3.2.1 runs with java 7 or higher.
# It can be installed into servlet containers: jetty and tomcat. Jetty is   
# bundled with the installer.

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


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

GEONETWORK_VERSION=3.2.1-0
GEONETWORK_VERSION_FOLDER=3.2.1

TMP="/tmp/build_geonetwork"
INSTALL_FOLDER="/usr/local/lib"
GEONETWORK_FOLDER="$INSTALL_FOLDER/geonetwork"
BIN="/usr/local/bin"


## Setup things... ##
 
# check required tools are installed
# (should we also verify java???)
if [ ! -x "`which wget`" ] ; then
   echo "ERROR: wget is required, please install it and try again" 
   exit 1
fi

# create tmp folders
mkdir -p "$TMP"
cd "$TMP"


# get geonetwork
if [ -f "geonetwork-install-$GEONETWORK_VERSION.jar" ]
then
   echo "geonetwork-install-$GEONETWORK_VERSION.jar has already been downloaded."
else
   wget -c --progress=dot:mega \
     "https://download.osgeo.org/livedvd/data/geonetwork/geonetwork-install-$GEONETWORK_VERSION.jar" \
     -O geonetwork-install-$GEONETWORK_VERSION.jar
fi
# "https://sourceforge.net/projects/geonetwork/files/GeoNetwork_unstable_development_versions/$GEONETWORK_VERSION_FOLDER/geonetwork-install-$GEONETWORK_VERSION.jar/download"

## Get Install config files ##
# Those files contains information about default ports
# and need to be updated to properly setup the node on the OSGeo live machine
echo "START copy of files."

FILES="
install.xml
jetty.xml
{'fraction_non_alphanumeric': 0.15544635544635543, 'fraction_numerical': 0.013431613431613431, 'mean_word_length': 4.5058611361587015, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 29, 'https://': 3, 'lorem ipsum': 0, 'www.': 2, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '483472', 'n_tokens_mistral': 2028, 'n_tokens_neox': 1918, 'n_words': 631}