Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ALPHA 3. ETF. Add installation and check of java11 as sudo to ensure its installation #412

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions bin/install_etf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# Author: Guadaltel <guadaltel.com> | Daniel Martín Pérez de León <[email protected]>
# Version 2024-09-20
#
# This script must be run as sudo
#############################################################################
# Copyright (c) 2011-2019 The Open Source Geospatial Foundation and others.
# Licensed under the GNU LGPL.
Expand Down Expand Up @@ -33,7 +34,7 @@ START=$(date +%M:%S)
BUILD_DIR=`pwd`
TMP="/tmp/build_etf"
if [ -z "$USER_NAME" ] ; then
USER_NAME=$(whoami)
USER_NAME=${SUDO_USER:-$(whoami)}
fi
USER_HOME="/home/$USER_NAME"
JETTY9_SCRIPT_NAME="jetty9"
Expand Down Expand Up @@ -83,11 +84,11 @@ echo "JAVA_PKG: $JAVA_PKG"
apt-get -qq update

# Check if openjdk-11-jdk-headless is installed
if dpkg -l | grep -q "$JAVA_PKG"; then
if sudo dpkg -l | grep -q "$JAVA_PKG"; then
echo "$JAVA_PKG is installed."
else
echo "$JAVA_PKG is not installed. Installing now..."
apt-get --assume-yes install "$JAVA_PKG"
sudo apt-get --assume-yes install "$JAVA_PKG"
fi

#
Expand Down