Browse Source

fix(install): improve steamcmd detection

and
pull/3583/head
Daniel Gibbs 4 years ago
parent
commit
cc8492c417
No known key found for this signature in database GPG Key ID: 5D5AB867A27738EC
  1. 4
      lgsm/data/almalinux-8.csv
  2. 4
      lgsm/data/centos-7.csv
  3. 3
      lgsm/data/centos-8.csv
  4. 16
      lgsm/data/debian-10.csv
  5. 8
      lgsm/data/debian-11.csv
  6. 16
      lgsm/data/debian-9.csv
  7. 4
      lgsm/data/rhel-7.csv
  8. 4
      lgsm/data/rhel-8.csv
  9. 4
      lgsm/data/rocky-8.csv
  10. 16
      lgsm/data/ubuntu-16.04.csv
  11. 16
      lgsm/data/ubuntu-18.04.csv
  12. 9
      lgsm/data/ubuntu-20.04.csv
  13. 8
      lgsm/data/ubuntu-21.04.csv
  14. 22
      lgsm/functions/check_deps.sh

4
lgsm/data/almalinux-8.csv

@ -1,4 +1,5 @@
all,epel-release,curl,wget,util-linux,python36,file,tar,gzip,bzip2,unzip,xz,binutils,bc,jq,tmux,nmap-ncat,cpio,hostname all,bc,binutils,bzip2,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz
steamcmd,glibc.i686,lib32gcc1
ac ac
ahl ahl
ahl2 ahl2
@ -96,6 +97,7 @@ sof2
sol sol
squad squad
st st
stn
sven sven
terraria terraria
tf2,libcurl.i686 tf2,libcurl.i686

Can't render this file because it has a wrong number of fields in line 2.

4
lgsm/data/centos-7.csv

@ -1,4 +1,5 @@
all,epel-release,curl,wget,util-linux,python36,file,tar,gzip,bzip2,unzip,xz,binutils,bc,jq,tmux,nmap-ncat,cpio,hostname all,bc,binutils,bzip2,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz
steamcmd,glibc.i686,lib32gcc1
ac ac
ahl ahl
ahl2 ahl2
@ -96,6 +97,7 @@ sof2
sol sol
squad squad
st st
stn
sven sven
terraria terraria
tf2,libcurl.i686 tf2,libcurl.i686

Can't render this file because it has a wrong number of fields in line 2.

3
lgsm/data/centos-8.csv

@ -1,4 +1,5 @@
all,epel-release,curl,wget,util-linux,python36,file,tar,gzip,bzip2,unzip,xz,binutils,bc,jq,tmux,nmap-ncat,cpio,hostname all,bc,binutils,bzip2,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz
steamcmd,glibc.i686,lib32gcc1
ac ac
ahl ahl
ahl2 ahl2

Can't render this file because it has a wrong number of fields in line 2.

16
lgsm/data/debian-10.csv

@ -1,4 +1,5 @@
all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,jq,python3,tar,tmux,util-linux,netcat,unzip,xz-utils,lib32gcc1,lib32stdc++6,hostname all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils
steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
ac ac
ahl ahl
ahl2 ahl2
@ -56,7 +57,7 @@ kf2
lo lo
l4d l4d
l4d2 l4d2
mc,openjdk-11-jre mc,openjdk-16-jre
mcb mcb
mh mh
mohaa,libstdc++5:i386 mohaa,libstdc++5:i386
@ -68,14 +69,14 @@ nmrih,libtinfo5:i386
ns ns
ns2,speex,libtbb2 ns2,speex,libtbb2
ns2c,speex:i386,libtbb2 ns2c,speex:i386,libtbb2
onset onset,libmariadbclient-dev
opfor opfor
pc pc
pmc,openjdk-11-jre pmc,openjdk-16-jre
pstbs,libgconf-2-4 pstbs,libgconf-2-4
pvkii pvkii
pvr,libc++1 pvr,libc++1
pz pz,openjdk-16-jre,rng-tools
q2 q2
q3 q3
ql ql
@ -84,7 +85,7 @@ ricochet
ro ro
rtcw rtcw
rust,lib32z1 rust,lib32z1
rw,openjdk-11-jre rw,openjdk-16-jre
samp samp
sb sb
sbots sbots
@ -96,6 +97,7 @@ sof2
sol sol
squad squad
st st
stn
sven,libssl1.1:i386,zlib1g:i386 sven,libssl1.1:i386,zlib1g:i386
terraria terraria
tf2,libcurl4-gnutls-dev:i386 tf2,libcurl4-gnutls-dev:i386
@ -114,7 +116,7 @@ vs
vints,mono-complete vints,mono-complete
wet wet
wf wf
wmc,openjdk-11-jre wmc,openjdk-16-jre
wurm,xvfb wurm,xvfb
zmr,libtinfo5:i386 zmr,libtinfo5:i386
zps,libtinfo5:i386 zps,libtinfo5:i386

Can't render this file because it has a wrong number of fields in line 2.

8
lgsm/data/debian-11.csv

@ -1,4 +1,5 @@
all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,jq,python3,tar,tmux,util-linux,netcat,unzip,xz-utils,lib32gcc-s1,lib32stdc++6,hostname all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils
steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
ac ac
ahl ahl
ahl2 ahl2
@ -68,14 +69,14 @@ nmrih,libtinfo5:i386
ns ns
ns2,speex,libtbb2 ns2,speex,libtbb2
ns2c,speex:i386,libtbb2 ns2c,speex:i386,libtbb2
onset onset,libmariadbclient-dev
opfor opfor
pc pc
pmc,openjdk-16-jre pmc,openjdk-16-jre
pstbs,libgconf-2-4 pstbs,libgconf-2-4
pvkii pvkii
pvr,libc++1 pvr,libc++1
pz pz,openjdk-16-jre,rng-tools
q2 q2
q3 q3
ql ql
@ -96,6 +97,7 @@ sof2
sol sol
squad squad
st st
stn
sven,libssl1.1:i386,zlib1g:i386 sven,libssl1.1:i386,zlib1g:i386
terraria terraria
tf2,libcurl4-gnutls-dev:i386 tf2,libcurl4-gnutls-dev:i386

Can't render this file because it has a wrong number of fields in line 2.

16
lgsm/data/debian-9.csv

@ -1,4 +1,5 @@
all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,jq,python3,tar,tmux,util-linux,netcat,unzip,xz-utils,lib32gcc1,lib32stdc++6,hostname all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils
steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
ac ac
ahl ahl
ahl2 ahl2
@ -56,7 +57,7 @@ kf2
lo lo
l4d l4d
l4d2 l4d2
mc,openjdk-8-jre mc,openjdk-16-jre
mcb mcb
mh mh
mohaa,libstdc++5:i386 mohaa,libstdc++5:i386
@ -68,14 +69,14 @@ nmrih,libtinfo5:i386
ns ns
ns2,speex,libtbb2 ns2,speex,libtbb2
ns2c,speex:i386,libtbb2 ns2c,speex:i386,libtbb2
onset onset,libmariadbclient-dev
opfor opfor
pc pc
pmc,openjdk-8-jre pmc,openjdk-16-jre
pstbs,libgconf-2-4 pstbs,libgconf-2-4
pvkii pvkii
pvr,libc++1 pvr,libc++1
pz pz,openjdk-16-jre,rng-tools
q2 q2
q3 q3
ql ql
@ -84,7 +85,7 @@ ricochet
ro ro
rtcw rtcw
rust,lib32z1 rust,lib32z1
rw,openjdk-8-jre rw,openjdk-16-jre
samp samp
sb sb
sbots sbots
@ -96,6 +97,7 @@ sof2
sol sol
squad squad
st st
stn
sven,libssl1.1:i386,zlib1g:i386 sven,libssl1.1:i386,zlib1g:i386
terraria terraria
tf2,libcurl4-gnutls-dev:i386 tf2,libcurl4-gnutls-dev:i386
@ -114,7 +116,7 @@ vs
vints,mono-complete vints,mono-complete
wet wet
wf wf
wmc,openjdk-8-jre wmc,openjdk-16-jre
wurm,xvfb wurm,xvfb
zmr,libtinfo5:i386 zmr,libtinfo5:i386
zps,libtinfo5:i386 zps,libtinfo5:i386

Can't render this file because it has a wrong number of fields in line 2.

4
lgsm/data/rhel-7.csv

@ -1,4 +1,5 @@
all,epel-release,curl,wget,util-linux,python36,file,tar,gzip,bzip2,unzip,xz,binutils,bc,jq,tmux,nmap-ncat,cpio,hostname all,bc,binutils,bzip2,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz
steamcmd,glibc.i686,lib32gcc1
ac ac
ahl ahl
ahl2 ahl2
@ -96,6 +97,7 @@ sof2
sol sol
squad squad
st st
stn
sven sven
terraria terraria
tf2,libcurl.i686 tf2,libcurl.i686

Can't render this file because it has a wrong number of fields in line 2.

4
lgsm/data/rhel-8.csv

@ -1,4 +1,5 @@
all,epel-release,curl,wget,util-linux,python36,file,tar,gzip,bzip2,unzip,xz,binutils,bc,jq,tmux,nmap-ncat,cpio,hostname all,bc,binutils,bzip2,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz
steamcmd,glibc.i686,lib32gcc1
ac ac
ahl ahl
ahl2 ahl2
@ -96,6 +97,7 @@ sof2
sol sol
squad squad
st st
stn
sven sven
terraria terraria
tf2,libcurl.i686 tf2,libcurl.i686

Can't render this file because it has a wrong number of fields in line 2.

4
lgsm/data/rocky-8.csv

@ -1,4 +1,5 @@
all,epel-release,curl,wget,util-linux,python36,file,tar,gzip,bzip2,unzip,xz,binutils,bc,jq,tmux,nmap-ncat,cpio,hostname all,bc,binutils,bzip2,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz
steamcmd,glibc.i686,lib32gcc1
ac ac
ahl ahl
ahl2 ahl2
@ -96,6 +97,7 @@ sof2
sol sol
squad squad
st st
stn
sven sven
terraria terraria
tf2,libcurl.i686 tf2,libcurl.i686

Can't render this file because it has a wrong number of fields in line 2.

16
lgsm/data/ubuntu-16.04.csv

@ -1,4 +1,5 @@
all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,jq,python3,tar,tmux,util-linux,netcat,unzip,xz-utils,lib32gcc1,lib32stdc++6,hostname all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils
steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
ac ac
ahl ahl
ahl2 ahl2
@ -56,7 +57,7 @@ kf2
lo lo
l4d l4d
l4d2 l4d2
mc,openjdk-8-jre mc,openjdk-16-jre
mcb mcb
mh mh
mohaa,libstdc++5:i386 mohaa,libstdc++5:i386
@ -68,14 +69,14 @@ nmrih,libtinfo5:i386
ns ns
ns2,speex,libtbb2 ns2,speex,libtbb2
ns2c,speex:i386,libtbb2 ns2c,speex:i386,libtbb2
onset onset,libmariadbclient-dev
opfor opfor
pc pc
pmc,openjdk-8-jre pmc,openjdk-16-jre
pstbs,libgconf-2-4 pstbs,libgconf-2-4
pvkii pvkii
pvr,libc++1 pvr,libc++1
pz pz,openjdk-16-jre,rng-tools
q2 q2
q3 q3
ql ql
@ -84,7 +85,7 @@ ricochet
ro ro
rtcw rtcw
rust,lib32z1 rust,lib32z1
rw,openjdk-8-jre rw,openjdk-16-jre
samp samp
sb sb
sbots sbots
@ -96,6 +97,7 @@ sof2
sol sol
squad squad
st st
stn
sven,libssl1.1:i386,zlib1g:i386 sven,libssl1.1:i386,zlib1g:i386
terraria terraria
tf2,libcurl4-gnutls-dev:i386 tf2,libcurl4-gnutls-dev:i386
@ -114,7 +116,7 @@ vs
vints,mono-complete vints,mono-complete
wet wet
wf wf
wmc,openjdk-8-jre wmc,openjdk-16-jre
wurm,xvfb wurm,xvfb
zmr,libtinfo5:i386 zmr,libtinfo5:i386
zps,libtinfo5:i386 zps,libtinfo5:i386

Can't render this file because it has a wrong number of fields in line 2.

16
lgsm/data/ubuntu-18.04.csv

@ -1,4 +1,5 @@
all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,jq,python3,tar,tmux,util-linux,netcat,unzip,xz-utils,lib32gcc1,lib32stdc++6,hostname all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils
steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
ac ac
ahl ahl
ahl2 ahl2
@ -56,7 +57,7 @@ kf2
lo lo
l4d l4d
l4d2 l4d2
mc,openjdk-11-jre mc,openjdk-16-jre
mcb mcb
mh mh
mohaa,libstdc++5:i386 mohaa,libstdc++5:i386
@ -68,14 +69,14 @@ nmrih,libtinfo5:i386
ns ns
ns2,speex,libtbb2 ns2,speex,libtbb2
ns2c,speex:i386,libtbb2 ns2c,speex:i386,libtbb2
onset onset,libmariadbclient-dev
opfor opfor
pc pc
pmc,openjdk-11-jre pmc,openjdk-16-jre
pstbs,libgconf-2-4 pstbs,libgconf-2-4
pvkii pvkii
pvr,libc++1 pvr,libc++1
pz pz,openjdk-16-jre,rng-tools
q2 q2
q3 q3
ql ql
@ -84,7 +85,7 @@ ricochet
ro ro
rtcw rtcw
rust,lib32z1 rust,lib32z1
rw,openjdk-11-jre rw,openjdk-16-jre
samp samp
sb sb
sbots sbots
@ -96,6 +97,7 @@ sof2
sol sol
squad squad
st st
stn
sven,libssl1.1:i386,zlib1g:i386 sven,libssl1.1:i386,zlib1g:i386
terraria terraria
tf2,libcurl4-gnutls-dev:i386 tf2,libcurl4-gnutls-dev:i386
@ -114,7 +116,7 @@ vs
vints,mono-complete vints,mono-complete
wet wet
wf wf
wmc,openjdk-11-jre wmc,openjdk-16-jre
wurm,xvfb wurm,xvfb
zmr,libtinfo5:i386 zmr,libtinfo5:i386
zps,libtinfo5:i386 zps,libtinfo5:i386

Can't render this file because it has a wrong number of fields in line 2.

9
lgsm/data/ubuntu-20.04.csv

@ -1,5 +1,5 @@
all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,jq,python3,tar,tmux,util-linux,netcat,unzip,xz-utils,lib32gcc1,lib32stdc++6,hostname all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils
steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386 steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
ac ac
ahl ahl
ahl2 ahl2
@ -69,14 +69,14 @@ nmrih,libtinfo5:i386
ns ns
ns2,speex,libtbb2 ns2,speex,libtbb2
ns2c,speex:i386,libtbb2 ns2c,speex:i386,libtbb2
onset onset,libmariadbclient-dev
opfor opfor
pc pc
pmc,openjdk-16-jre pmc,openjdk-16-jre
pstbs,libgconf-2-4 pstbs,libgconf-2-4
pvkii pvkii
pvr,libc++1 pvr,libc++1
pz pz,openjdk-16-jre,rng-tools
q2 q2
q3 q3
ql ql
@ -97,6 +97,7 @@ sof2
sol sol
squad squad
st st
stn
sven,libssl1.1:i386,zlib1g:i386 sven,libssl1.1:i386,zlib1g:i386
terraria terraria
tf2,libcurl4-gnutls-dev:i386 tf2,libcurl4-gnutls-dev:i386

Can't render this file because it has a wrong number of fields in line 2.

8
lgsm/data/ubuntu-21.04.csv

@ -1,4 +1,5 @@
all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,jq,python3,tar,tmux,util-linux,netcat,unzip,xz-utils,lib32gcc-s1,lib32stdc++6,hostname all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils
steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
ac ac
ahl ahl
ahl2 ahl2
@ -68,14 +69,14 @@ nmrih,libtinfo5:i386
ns ns
ns2,speex,libtbb2 ns2,speex,libtbb2
ns2c,speex:i386,libtbb2 ns2c,speex:i386,libtbb2
onset onset,libmariadbclient-dev
opfor opfor
pc pc
pmc,openjdk-16-jre pmc,openjdk-16-jre
pstbs,libgconf-2-4 pstbs,libgconf-2-4
pvkii pvkii
pvr,libc++1 pvr,libc++1
pz pz,openjdk-16-jre,rng-tools
q2 q2
q3 q3
ql ql
@ -96,6 +97,7 @@ sof2
sol sol
squad squad
st st
stn
sven,libssl1.1:i386,zlib1g:i386 sven,libssl1.1:i386,zlib1g:i386
terraria terraria
tf2,libcurl4-gnutls-dev:i386 tf2,libcurl4-gnutls-dev:i386

Can't render this file because it has a wrong number of fields in line 2.

22
lgsm/functions/check_deps.sh

@ -217,8 +217,14 @@ fn_check_loop(){
# Checks if dependency is installed or not. # Checks if dependency is installed or not.
fn_deps_detector(){ fn_deps_detector(){
## Check.
# SteamCMD: Will be removed from required array if non-free repo is not available.
# This will cause SteamCMD to be installed using tar.
if [ "${deptocheck}" == "steamcmd" ]&&[ "${distroid}" == "debian" ]&& ! grep -qE "^deb .*non-free" /etc/apt/sources.list; then
array_deps_required=( "${array_deps_required[@]/steamcmd}" )
steamcmdstatus=1
# Java: Added for users using Oracle JRE to bypass check. # Java: Added for users using Oracle JRE to bypass check.
if [[ ${deptocheck} == "openjdk"* ]]||[[ ${deptocheck} == "java"* ]]; then elif [[ ${deptocheck} == "openjdk"* ]]||[[ ${deptocheck} == "java"* ]]; then
# Is java already installed? # Is java already installed?
if [ -n "${javaversion}" ]; then if [ -n "${javaversion}" ]; then
# Added for users using Oracle JRE to bypass check. # Added for users using Oracle JRE to bypass check.
@ -249,6 +255,7 @@ fn_deps_detector(){
depstatus=$? depstatus=$?
fi fi
# Outcome of Check.
if [ "${depstatus}" == "0" ]; then if [ "${depstatus}" == "0" ]; then
# If dependency is found. # If dependency is found.
missingdep=0 missingdep=0
@ -256,21 +263,23 @@ fn_deps_detector(){
echo -e "${green}${deptocheck}${default}" echo -e "${green}${deptocheck}${default}"
sleep 0.1 sleep 0.1
fi fi
else elif [ "${depstatus}" != "0" ]; then
# If dependency is not found. # If dependency is not found.
missingdep=1 missingdep=1
if [ "${commandname}" == "INSTALL" ]; then if [ "${commandname}" == "INSTALL" ]; then
echo -e "${red}${deptocheck}${default}" echo -e "${red}${deptocheck}${default}"
sleep 0.1 sleep 0.1
fi fi
# Define required dependencies for SteamCMD. # If SteamCMD requirements are not met install will fail.
if [ -n "${appid}" ]; then if [ -n "${appid}" ]; then
array_steamcmd_deps_required=("${depsteamcmd}") for steamcmddeptocheck in ${array_deps_required_steamcmd[*]}; do
for steamcmddeptocheck in ${array_steamcmd_deps_required[*]}; do if [ "${deptocheck}" != "steamcmd" ]&&[ "${deptocheck}" == "${steamcmddeptocheck}" ]; then
if [ "${deptocheck}" == "${steamcmddeptocheck}" ]; then
steamcmdfail=1 steamcmdfail=1
fi fi
done done
# If SteamCMD is not available in repo dont check for it.
elif [ "${steamcmdstatus}" == "1" ]; then
:
fi fi
fi fi
unset depstatus unset depstatus
@ -321,6 +330,7 @@ if [ -f "${datadir}/${distroid}-${distroversion}.csv" ]; then
array_deps_missing=() array_deps_missing=()
array_deps_required=("${depall} ${depsteamcmd} ${depshortname}") array_deps_required=("${depall} ${depsteamcmd} ${depshortname}")
array_deps_required_steamcmd=("${depsteamcmd}")
fn_deps_email fn_deps_email
# Unique sort dependency array. # Unique sort dependency array.
IFS=" " read -r -a array_deps_required <<< "$(echo "${array_deps_required[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' ')" IFS=" " read -r -a array_deps_required <<< "$(echo "${array_deps_required[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' ')"

Loading…
Cancel
Save