<commit_before>#!/bin/bash
#################################################################################
#
# Purpose: Installation of deegree-webservices-3.4.1 into Xubuntu
# Author:  <NAME> <<EMAIL>>
# Credits: <NAME> <<EMAIL>>
#          H.Bowman <hamish_b  yahoo com>
#          <NAME> <<EMAIL>>
#          <NAME> <<EMAIL>>
#          <NAME> <<EMAIL>>
#          <NAME> <<EMAIL>>
# Date:    $Date$
# Revision:$Revision$
#
#################################################################################
# Copyright (c) 2009-2018 lat/lon GmbH
# Copyright (c) 2016-2018 The Open Source Geospatial Foundation and others.
#
# 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".
#################################################################################

# About:
# =====
# This script will install deegree-webservices
#
# deegree webservices version 3.4.1 runs with openjdk8 on Apache Tomcat 8.0+
#

# Running:
# =======
# sudo ./install_deegree.sh

###########################

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

###########################

TMP="/tmp/build_deegree"
INSTALL_FOLDER="/usr/local/lib"
DEEGREE_FOLDER="$INSTALL_FOLDER/deegree-webservices-3.4.1"
DEEGREE_WORKSPACE_ROOT="/usr/local/share/deegree"
BIN="/usr/local/bin"

if [ -z "$USER_NAME" ] ; then
   USER_NAME="user"
fi
USER_HOME="/home/$USER_NAME"
PASSWORD="<PASSWORD>"
BUILD_DIR=`pwd`
TOMCAT_PORT=8033

## check required tools are installed
if [ ! -x "`which wget`" ] ; then
   echo "ERROR: wget is required, please install it and try again."
   exit 1
fi
if [ ! -x "`which java`" ] ; then
   echo "ERROR: java is required, please install it and try again."
   exit 1
fi

## create tmp folder
BUILD_DIR=`pwd`
mkdir -p "$TMP"
cd "$TMP"

## download required stuff into tmp folder
wget -N --progress=dot:mega -O "deegree-webservices-3.4.1.zip" \
   "http://repo.deegree.org/content/groups/public/org/deegree/deegree-webservices-tomcat-bundle/3.4.1/deegree-webservices-tomcat-bundle-3.4.1-distribution.zip"
wget -N --progress=dot:mega \
   "http://repo.deegree.org/content/groups/public/org/deegree/deegree-workspace-inspire/3.4.1/deegree-workspace-inspire-3.4.1.deegree-workspace"

cp "$BUILD_DIR"/../app-conf/deegree/deegree_start.sh .
cp "$BUILD_DIR"/../app-conf/deegree/deegree_stop.sh .

### Install deegree-webservices (with included Tomcat) ###

## unpack as root
cd "$TMP"
unzip -q deegree-webservices-3.4.1.zip
mv deegree-webservices-tomcat-bundle-3.4.1 deegree-webservices-3.4.1
mv deegree-webservices-3.4.1/apache-tomcat-8.0.50/* deegree-webservices-3.4.1/
rmdir deegree-webservices-3.4.1/apache-tomcat-8.0.50
mv deegree-webservices-3.4.1 "$INSTALL_FOLDER"
# "user" must not own files outside of /home
# do "chmod g+w; chgrp users" if needed, but only on stuff that really needs it
#chown -R $USER_NAME:$USER_NAME "$DEEGREE_FOLDER"

### Configure Application ###

## Copy startup script for deegree
cp $TMP/deegree_start.sh $BIN
cp $TMP/deegree_stop.sh $BIN
chmod 755 "$BIN"/deegree_st*.sh

### install desktop icons ##
if [ ! -e "/usr/share/icons/deegree_desktop_48x48.png" ] ; then
   wget -nv "http://download.deegree.org/LiveDVD/FOSS4G2012/deegree_desktop_48x48.png"<commit_msg>Fixed wget timestamping warning<commit_after>#!/bin/bash
#################################################################################
#
# Purpose: Installation of deegree-webservices-3.4.1 into Xubuntu
# Author:  <NAME> <<EMAIL>>
# Credits: <NAME> <<EMAIL>>
#          H.Bowman <hamish_b  yahoo com>
#          <NAME> <<EMAIL>>
#          <NAME> <<EMAIL>>
#          <NAME> <<EMAIL>>
#          <NAME> <<EMAIL>>
# Date:    $Date$
# Revision:$Revision$
#
#################################################################################
# Copyright (c) 2009-2018 lat/lon GmbH
# Copyright (c) 2016-2018 The Open Source Geospatial Foundation and others.
#
# 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".
#################################################################################

# About:
# =====
# This script will install deegree-webservices
#
# deegree webservices version 3.4.1 runs with openjdk8 on Apache Tomcat 8.0+
#

# Running:
# =======
# sudo ./install_deegree.sh

###########################

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

###########################

TMP="/tmp/build_deegree"
INSTALL_FOLDER="/usr/local/lib"
DEEGREE_FOLDER="$INSTALL_FOLDER/deegree-webservices-3.4.1"
DEEGREE_WORKSPACE_ROOT="/usr/local/share/deegree"
BIN="/usr/local/bin"

if [ -z "$USER_NAME" ] ; then
   USER_NAME="user"
fi
USER_HOME="/home/$USER_NAME"
PASSWORD="<PASSWORD>"
BUILD_DIR=`pwd`
TOMCAT_PORT=8033

## check required tools are installed
if [ ! -x "`which wget`" ] ; then
   echo "ERROR: wget is required, please install it and try again."
   exit 1
fi
if [ ! -x "`which java`" ] ; then
   echo "ERROR: java is required, please install it and try again."
   exit 1
fi

## create tmp folder
BUILD_DIR=`pwd`
mkdir -p "$TMP"
cd "$TMP"

## download required stuff into tmp folder
wget -c --progress=dot:mega \
   -O "deegree-webservices-3.4.1.zip" \
   "http://repo.deegree.org/content/groups/public/org/deegree/deegree-webservices-tomcat-bundle/3.4.1/deegree-webservices-tomcat-bundle-3.4.1-distribution.zip"
wget -c --progress=dot:mega \
   "http://repo.deegree.org/content/groups/public/org/deegree/deegree-workspace-inspire/3.4.1/deegree-workspace-inspire-3.4.1.deegree-workspace"

cp "$BUILD_DIR"/../app-conf/deegree/deegree_start.sh .
cp "$BUILD_DIR"/../app-conf/deegree/deegree_stop.sh .

### Install deegree-webservices (with included Tomcat) ###

## unpack as root
cd "$TMP"
unzip -q deegree-webservices-3.4.1.zip
mv deegree-webservices-tomcat-bundle-3.4.1 deegree-webservices-3.4.1
mv deegree-webservices-3.4.1/apache-tomcat-8.0.50/* deegree-webservices-3.4.1/
rmdir deegree-webservices-3.4.1/apache-tomcat-8.0.50
mv deegree-webservices-3.4.1 "$INSTALL_FOLDER"
# "user" must not own files outside of /home
# do "chmod g+w; chgrp users" if needed, but only on stuff that really needs it
#chown -R $USER_NAME:$USER_NAME "$DEEGREE_FOLDER"

### Configure Application ###

## Copy startup script for deegree
cp $TMP/deegree_start.sh $BIN
cp $TMP/deegree_stop.sh $BIN
chmod 755 "$BIN"/deegree_st*.sh

### install desktop icons ##
if [ ! -e "/usr/share/icons/deegree_desktop_48x48.png" ] ; then
   wget -nv "http://download.deegree.org/LiveDVD/FOSS4G2012/deegree_desktop_48x48.png"
{'fraction_non_alphanumeric': 0.20862363612462206, 'fraction_numerical': 0.0255028263441567, 'mean_word_length': 4.376678445229682, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3476605', 'n_tokens_mistral': 2747, 'n_tokens_neox': 2608, 'n_words': 660}