|
|
@@ -95,39 +95,6 @@ fn_install_mono_repo(){
|
|
|
fi
|
|
|
}
|
|
|
|
|
|
-fn_install_universe_repo(){
|
|
|
- # Defensive coding - As this is an ubuntu only issue then check to make sure this fix is needed, and we are using ubuntu
|
|
|
- if [ "${jquniversemissing}" != "0" ]&&[ "${distroid}" == "ubuntu" ]; then
|
|
|
- fn_print_warning_nl "Ubuntu 18.04.1 contains a bug which means the sources.list file does not populate with the Ubuntu universe repository."
|
|
|
- fn_print_information_nl "Attempting to add Universe Repo"
|
|
|
- sleep 0.5
|
|
|
- sudo -v > /dev/null 2>&1
|
|
|
- if [ $? -eq 0 ]; then
|
|
|
- echo -en ".\r"
|
|
|
- sleep 1
|
|
|
- echo -en "..\r"
|
|
|
- sleep 1
|
|
|
- echo -en "...\r"
|
|
|
- sleep 1
|
|
|
- echo -en " \r"
|
|
|
- cmd="sudo apt-add-repository universe"
|
|
|
- eval ${cmd}
|
|
|
- if [ $? -eq 0 ]; then
|
|
|
- fn_print_complete_nl "Installing universe repository completed."
|
|
|
- fn_script_log_pass "Installing universe repository completed."
|
|
|
- else
|
|
|
- fn_print_failure_nl "Unable to install universe repository."
|
|
|
- fn_script_log_fatal "Unable to install universe repository."
|
|
|
- fi
|
|
|
- else
|
|
|
- fn_print_warning_nl "$(whoami) does not have sudo access. Manually add Universe repository."
|
|
|
- fn_script_log_warn "$(whoami) does not have sudo access. Manually add Universe repository."
|
|
|
- echo " Please run the following command as a user with sudo access, and re-run the installation"
|
|
|
- echo " sudo apt-add-repository universe"
|
|
|
- fi
|
|
|
- fi
|
|
|
-}
|
|
|
-
|
|
|
fn_deps_detector(){
|
|
|
# Checks if dependency is missing
|
|
|
if [ "${tmuxcheck}" == "1" ]; then
|
|
|
@@ -141,12 +108,7 @@ fn_deps_detector(){
|
|
|
deptocheck="${javaversion}"
|
|
|
unset javacheck
|
|
|
elif [ "${deptocheck}" == "jq" ]&&[ "${distroversion}" == "6" ]; then
|
|
|
- jqstatus=1
|
|
|
- elif [ "${deptocheck}" == "jq" ]&&[ "${distroid}" == "ubuntu" ]&&[ "${distroversion}" == "18.04" ]&& ! grep -qE "^deb .*universe" /etc/apt/sources.list; then
|
|
|
- depstatus=1
|
|
|
- jquniversemissing=1
|
|
|
- #1985 ubuntu 18.04.1 bug does not set sources.list correctly which means universe is not active by default
|
|
|
- #check if the universe exists and active
|
|
|
+ jqstatus=1
|
|
|
elif [ "${deptocheck}" == "mono-complete" ]; then
|
|
|
if [ "$(command -v mono 2>/dev/null)" ]&&[ "$(mono --version 2>&1 | grep -Po '(?<=version )\d')" -ge 5 ]; then
|
|
|
# Mono >= 5.0.0 already installed
|
|
|
@@ -217,10 +179,9 @@ fn_deps_email(){
|
|
|
|
|
|
fn_found_missing_deps(){
|
|
|
if [ "${#array_deps_missing[@]}" != "0" ]; then
|
|
|
- fn_print_dots "Checking dependencies"
|
|
|
- sleep 0.5
|
|
|
- fn_print_error_nl "Checking dependencies: missing: ${red}${array_deps_missing[@]}${default}"
|
|
|
- fn_script_log_error "Checking dependencies: missing: ${array_deps_missing[@]}"
|
|
|
+
|
|
|
+ fn_print_warning_nl "Missing dependencies: ${red}${array_deps_missing[@]}${default}"
|
|
|
+ fn_script_log_warn "Missing dependencies: ${array_deps_missing[@]}"
|
|
|
sleep 0.5
|
|
|
if [ -n "${monostatus}" ]; then
|
|
|
fn_install_mono_repo
|
|
|
@@ -229,9 +190,6 @@ fn_found_missing_deps(){
|
|
|
fn_print_warning_nl "jq is not available in the ${distroname} repository"
|
|
|
echo " * https://github.com/GameServerManagers/LinuxGSM/wiki/jq"
|
|
|
fi
|
|
|
- if [ -n "${jquniversemissing}" ]; then
|
|
|
- fn_install_universe_repo
|
|
|
- fi
|
|
|
sudo -v > /dev/null 2>&1
|
|
|
if [ $? -eq 0 ]; then
|
|
|
fn_print_information_nl "Automatically installing missing dependencies."
|
|
|
@@ -298,6 +256,11 @@ fn_found_missing_deps(){
|
|
|
if [ "${function_selfname}" == "command_install.sh" ]; then
|
|
|
sleep 5
|
|
|
fi
|
|
|
+ else
|
|
|
+ if [ "${function_selfname}" == "command_install.sh" ]; then
|
|
|
+ fn_print_information_nl "Required dependencies already installed"
|
|
|
+ fn_script_log_info "Required dependencies already installed"
|
|
|
+ fi
|
|
|
fi
|
|
|
}
|
|
|
|
|
|
@@ -396,6 +359,9 @@ fn_deps_build_debian(){
|
|
|
# Serious Sam 3: BFE
|
|
|
elif [ "${shortname}" == "ss3" ]; then
|
|
|
array_deps_required+=( libxrandr2:i386 libglu1-mesa:i386 libxtst6:i386 libusb-1.0-0-dev:i386 libxxf86vm1:i386 libopenal1:i386 libssl1.0.0:i386 libgtk2.0-0:i386 libdbus-glib-1-2:i386 libnm-glib-dev:i386 )
|
|
|
+ # Sven Co-op
|
|
|
+ elif [ "${shortname}" == "sven" ]; then
|
|
|
+ array_deps_required+=( libssl1.0.0:i386 )
|
|
|
# Unreal Engine
|
|
|
elif [ "${executable}" == "./ucc-bin" ]; then
|
|
|
#UT2K4
|
|
|
@@ -411,6 +377,9 @@ fn_deps_build_debian(){
|
|
|
# Eco
|
|
|
elif [ "${shortname}" == "eco" ]; then
|
|
|
array_deps_required+=( mono-complete )
|
|
|
+ # Wurm: Unlimited
|
|
|
+ elif [ "${shortname}" == "wurm" ]; then
|
|
|
+ array_deps_required+=( xvfb )
|
|
|
fi
|
|
|
fn_deps_email
|
|
|
fn_check_loop
|
|
|
@@ -523,9 +492,18 @@ fn_deps_build_redhat(){
|
|
|
}
|
|
|
|
|
|
if [ "${function_selfname}" == "command_install.sh" ]; then
|
|
|
- echo ""
|
|
|
- echo "Checking Dependencies"
|
|
|
- echo "================================="
|
|
|
+ if [ "$(whoami)" == "root" ]; then
|
|
|
+ echo ""
|
|
|
+ echo "Checking Dependencies as root"
|
|
|
+ echo "================================="
|
|
|
+ fn_print_information_nl "Checking any missing dependencies for ${gamename} server only."
|
|
|
+ fn_print_information_nl "This will NOT install a ${gamename} server."
|
|
|
+ sleep 2
|
|
|
+ else
|
|
|
+ echo ""
|
|
|
+ echo "Checking Dependencies"
|
|
|
+ echo "================================="
|
|
|
+ fi
|
|
|
fi
|
|
|
|
|
|
# Filter checking in to Debian or Red Hat Based
|