<commit_before>#!/bin/sh
# Copyright (c) 2011-2016 The Open Source Geospatial Foundation.
# Licensed under the GNU LGPL.
# 
# 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".
#
# Version: 2016-06-10
# Author: <EMAIL>
# TODO
# - check new version
#
# About:
# =====
# This script installs 52nSOS
#
#
# =============================================================================
# Install script for 52nSOS
# =============================================================================
#
# Variables
# -----------------------------------------------------------------------------
START=$(date +%M:%S)
./diskspace_probe.sh "`basename $0`" begin
BUILD_DIR=`pwd`
####

TMP="/tmp/build_52nSOS"
if [ -z "$USER_NAME" ] ; then
   USER_NAME="user"
fi
USER_HOME="/home/$USER_NAME"
TOMCAT_USER_NAME="tomcat8"
TOMCAT_SCRIPT_NAME="$TOMCAT_USER_NAME"
SOS_WEB_APP_NAME="52nSOS"
SOS_ICON_NAME="52nSOS.png"
SOS_URL="http://localhost:8080/$SOS_WEB_APP_NAME"
SOS_QUICKSTART_URL="http://localhost/osgeolive/en/quickstart/52nSOS_quickstart.html"
SOS_OVERVIEW_URL="http://localhost/osgeolive/en/overview/52nSOS_overview.html"
SOS_WAR_INSTALL_FOLDER="/var/lib/$TOMCAT_SCRIPT_NAME/webapps"
SOS_INSTALL_FOLDER="/usr/local/52nSOS"
SOS_BIN_FOLDER="/usr/local/share/52nSOS"
SOS_TAR_NAME="52n-sos-osgeo-live-9.0.tar.gz"
SOS_TAR_URL="http://52north.org/files/sensorweb/osgeo-live/"
SOS_VERSION="4.3.0"
PG_OPTIONS='--client-min-messages=warning'
PG_USER="postgres"
PG_SCRIPT_NAME="postgresql"
PG_DB_NAME="52nSOS"
# -----------------------------------------------------------------------------
#
echo "[$START]: $SOS_WEB_APP_NAME $SOS_VERSION install started"
echo "TMP: $TMP"
echo "USER_NAME: $USER_NAME"
echo "USER_HOME: $USER_HOME"
echo "TOMCAT_USER_NAME: $TOMCAT_USER_NAME"
echo "TOMCAT_SCRIPT_NAME: $TOMCAT_SCRIPT_NAME"
echo "SOS_WAR_INSTALL_FOLDER: $SOS_WAR_INSTALL_FOLDER"
echo "SOS_INSTALL_FOLDER: $SOS_INSTALL_FOLDER"
echo "SOS_TAR_NAME: $SOS_TAR_NAME"
echo "SOS_TAR_URL: $SOS_TAR_URL"
echo "SOS_WEB_APP_NAME: $SOS_WEB_APP_NAME"
echo "SOS_ICON_NAME: $SOS_ICON_NAME"
echo "SOS_URL: $SOS_URL"
echo "SOS_QUICKSTART_URL: $SOS_QUICKSTART_URL"
echo "SOS_OVERVIEW_URL: $SOS_OVERVIEW_URL"
echo "SOS_VERSION: $SOS_VERSION"
echo "PG_OPTIONS: $PG_OPTIONS"
echo "PG_USER: $PG_USER"
echo "PG_SCRIPT_NAME: $PG_SCRIPT_NAME" 
echo "PG_DB_NAME: $PG_DB_NAME"
#
#
# =============================================================================
# Pre install checks
# =============================================================================
# 1 wget
# 2 java
# 3 tomcat
# 4 postgresql
#
# 1 WGET
# It is required to download the 52North SOS package:
#
if [ ! -x "`which wget`" ] ; then
   apt-get install wget
fi
#
#
# 2 Check for OpenJDK
#
if [ ! -x "`which java`" ] ; then
	apt-get -q update
	#
	apt-get --assume-yes install openjdk-8-jre
fi
#<commit_msg>Change java version to 8<commit_after>#!/bin/sh
# Copyright (c) 2011-2016 The Open Source Geospatial Foundation.
# Licensed under the GNU LGPL.
# 
# 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".
#
# Version: 2016-06-10
# Author: <EMAIL>
# TODO
# - check new version
#
# About:
# =====
# This script installs 52nSOS
#
#
# =============================================================================
# Install script for 52nSOS
# =============================================================================
#
# Variables
# -----------------------------------------------------------------------------
START=$(date +%M:%S)
./diskspace_probe.sh "`basename $0`" begin
BUILD_DIR=`pwd`
####

TMP="/tmp/build_52nSOS"
if [ -z "$USER_NAME" ] ; then
   USER_NAME="user"
fi
USER_HOME="/home/$USER_NAME"
TOMCAT_USER_NAME="tomcat8"
TOMCAT_SCRIPT_NAME="$TOMCAT_USER_NAME"
SOS_WEB_APP_NAME="52nSOS"
SOS_ICON_NAME="52nSOS.png"
SOS_URL="http://localhost:8080/$SOS_WEB_APP_NAME"
SOS_QUICKSTART_URL="http://localhost/osgeolive/en/quickstart/52nSOS_quickstart.html"
SOS_OVERVIEW_URL="http://localhost/osgeolive/en/overview/52nSOS_overview.html"
SOS_WAR_INSTALL_FOLDER="/var/lib/$TOMCAT_SCRIPT_NAME/webapps"
SOS_INSTALL_FOLDER="/usr/local/52nSOS"
SOS_BIN_FOLDER="/usr/local/share/52nSOS"
SOS_TAR_NAME="52n-sos-osgeo-live-9.0.tar.gz"
SOS_TAR_URL="http://52north.org/files/sensorweb/osgeo-live/"
SOS_VERSION="4.3.0"
PG_OPTIONS='--client-min-messages=warning'
PG_USER="postgres"
PG_SCRIPT_NAME="postgresql"
PG_DB_NAME="52nSOS"
JAVA_PKG="openjdk-8-jre"
# -----------------------------------------------------------------------------
#
echo "[$START]: $SOS_WEB_APP_NAME $SOS_VERSION install started"
echo "TMP: $TMP"
echo "USER_NAME: $USER_NAME"
echo "USER_HOME: $USER_HOME"
echo "TOMCAT_USER_NAME: $TOMCAT_USER_NAME"
echo "TOMCAT_SCRIPT_NAME: $TOMCAT_SCRIPT_NAME"
echo "SOS_WAR_INSTALL_FOLDER: $SOS_WAR_INSTALL_FOLDER"
echo "SOS_INSTALL_FOLDER: $SOS_INSTALL_FOLDER"
echo "SOS_TAR_NAME: $SOS_TAR_NAME"
echo "SOS_TAR_URL: $SOS_TAR_URL"
echo "SOS_WEB_APP_NAME: $SOS_WEB_APP_NAME"
echo "SOS_ICON_NAME: $SOS_ICON_NAME"
echo "SOS_URL: $SOS_URL"
echo "SOS_QUICKSTART_URL: $SOS_QUICKSTART_URL"
echo "SOS_OVERVIEW_URL: $SOS_OVERVIEW_URL"
echo "SOS_VERSION: $SOS_VERSION"
echo "PG_OPTIONS: $PG_OPTIONS"
echo "PG_USER: $PG_USER"
echo "PG_SCRIPT_NAME: $PG_SCRIPT_NAME" 
echo "PG_DB_NAME: $PG_DB_NAME"
echo "JAVA_PKG: $JAVA_PKG"
#
#
# =============================================================================
# Pre install checks
# =============================================================================
# 1 wget
# 2 java
# 3 tomcat
# 4 postgresql
#
# 1 WGET
# It is required to download the 52North SOS package:
#
if [ ! -x "`which wget`" ] ; then
   apt-get install wget
fi
#
#
# 2 Check for OpenJDK
#
if [ ! -x "`which java`" ] ; then
	apt-get -q update
	#
	apt-get --assume-yes install $JAVA_PKG
fi
#
{'fraction_non_alphanumeric': 0.24359537403015663, 'fraction_numerical': 0.0182989313424096, 'mean_word_length': 4.707602339181286, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '7181332', 'n_tokens_mistral': 2592, 'n_tokens_neox': 2438, 'n_words': 542}