Skip to content

Commit cb5bca9

Browse files
committed
lint
1 parent d1d687b commit cb5bca9

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

lgsm/modules/fix_vh.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ if [ -f "${modsinstalledlistfullpath}" ]; then
1818
executable="./start_server_bepinex.sh"
1919
fi
2020
if [ -d "${serverfiles}/unstripped_corlib" ]; then
21-
rm -rf "${serverfiles}/unstripped_corlib"
22-
fi
23-
sed -i 's/^dllSearchPathOverride=unstripped_corlib/# &/' "${serverfiles}/doorstop_config.ini"
24-
sed -i 's/^export DOORSTOP_CORLIB_OVERRIDE_PATH="$BASEDIR\/unstripped_corlib"/# &/' "${serverfiles}/start_game_bepinex.sh"
25-
sed -i 's/^export DOORSTOP_CORLIB_OVERRIDE_PATH="${VALHEIM_PLUS_PATH}\/unstripped_corlib"/# &/' "${serverfiles}/start_server_bepinex.sh"
21+
rm -rf "${serverfiles}/unstripped_corlib"
22+
fi
23+
sed -i "s/^dllSearchPathOverride=unstripped_corlib/# &/" "${serverfiles}/doorstop_config.ini"
24+
sed -i "s/^export DOORSTOP_CORLIB_OVERRIDE_PATH="$BASEDIR\/unstripped_corlib"/# &/" "${serverfiles}/start_game_bepinex.sh"
25+
sed -i "s/^export DOORSTOP_CORLIB_OVERRIDE_PATH="${VALHEIM_PLUS_PATH}\/unstripped_corlib"/# &/" "${serverfiles}/start_server_bepinex.sh"
2626
fi
2727
# special exports for BepInEx if installed
2828
if grep -qE "^bepinexvh" "${modsinstalledlistfullpath}"; then

lgsm/modules/info_distro.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ kernel="$(uname -r)" # Kernel e.g. 2.6.32-042stab120.16
2828
distro_info_array=(os-release lsb_release hostnamectl debian_version redhat-release)
2929
for distro_info in "${distro_info_array[@]}"; do
3030
if [ -f "/etc/os-release" ] && [ "${distro_info}" == "os-release" ]; then
31-
distroname="$(grep "PRETTY_NAME" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')" # e.g. Ubuntu 22.04.3 LTS
32-
distroversion="$(grep "VERSION_ID" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')" # e.g. 22.04
31+
distroname="$(grep "PRETTY_NAME" /etc/os-release | awk -F= '{gsub(/"/,"",$2);print $2}')" # e.g. Ubuntu 22.04.3 LTS
32+
distroversion="$(grep "VERSION_ID" /etc/os-release | awk -F= '{gsub(/"/,"",$2);print $2}')" # e.g. 22.04
3333
# Special var for rhel like distros to remove point in number e.g 8.4 to just 8.
3434
if [[ "${distroidlike}" == *"rhel"* ]] || [ "${distroid}" == "rhel" ]; then
3535
distroversionrh="$(sed -nr 's/^VERSION_ID="([0-9]*).+?"/\1/p' /etc/os-release)" # e.g. 8
3636
fi
37-
distroid="$(grep "ID=" /etc/os-release | grep -v _ID | awk -F\= '{gsub(/"/,"",$2);print $2}')" # e.g. ubuntu
38-
distroidlike="$(grep "ID_LIKE=" /etc/os-release | grep -v _ID | awk -F\= '{gsub(/"/,"",$2);print $2}')" # e.g. debian
39-
distrocodename="$(grep "VERSION_CODENAME" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')" # e.g. jammy
37+
distroid="$(grep "ID=" /etc/os-release | grep -v _ID | awk -F= '{gsub(/"/,"",$2);print $2}')" # e.g. ubuntu
38+
distroidlike="$(grep "ID_LIKE=" /etc/os-release | grep -v _ID | awk -F= '{gsub(/"/,"",$2);print $2}')" # e.g. debian
39+
distrocodename="$(grep "VERSION_CODENAME" /etc/os-release | awk -F= '{gsub(/"/,"",$2);print $2}')" # e.g. jammy
4040
elif [ "$(command -v lsb_release 2> /dev/null)" ] && [ "${distro_info}" == "lsb_release" ]; then
4141
if [ -z "${distroname}" ]; then
4242
distroname="$(lsb_release -sd)" # e.g. Ubuntu 22.04.3 LTS

0 commit comments

Comments
 (0)