mirror of
https://github.com/aclist/dztui.git
synced 2025-04-08 13:33:00 +02:00
Fix steamcmd invocation parameters
This commit is contained in:
parent
9c5b00fa21
commit
94cbfd3f62
1 changed files with 8 additions and 8 deletions
16
dztui.sh
16
dztui.sh
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
version=0.3.2
|
version=0.3.3
|
||||||
release_url="https://raw.githubusercontent.com/aclist/dztui/main/dztui.sh"
|
release_url="https://raw.githubusercontent.com/aclist/dztui/main/dztui.sh"
|
||||||
aid=221100
|
aid=221100
|
||||||
game="dayz"
|
game="dayz"
|
||||||
|
@ -16,12 +16,12 @@ whitelist=""
|
||||||
fav=""
|
fav=""
|
||||||
name="player"
|
name="player"
|
||||||
separator="│"
|
separator="│"
|
||||||
ping="1"
|
ping=1
|
||||||
debug="0"
|
debug=0
|
||||||
#END CONFIG================
|
#END CONFIG================
|
||||||
|
|
||||||
#STEAMCMD CONFIG===========
|
#STEAMCMD CONFIG===========
|
||||||
auto_install_mods="0"
|
auto_install_mods=1
|
||||||
steamcmd_user="steam"
|
steamcmd_user="steam"
|
||||||
steam_username="STEAMUSER"
|
steam_username="STEAMUSER"
|
||||||
staging_dir="/tmp"
|
staging_dir="/tmp"
|
||||||
|
@ -121,7 +121,7 @@ columnize(){
|
||||||
test_fav(){
|
test_fav(){
|
||||||
if [[ -n $fav ]]; then
|
if [[ -n $fav ]]; then
|
||||||
if [[ $(echo -e "${tabled[$i]}" | awk -F'\t' -v fav=$fav '$5 == fav') ]] ; then
|
if [[ $(echo -e "${tabled[$i]}" | awk -F'\t' -v fav=$fav '$5 == fav') ]] ; then
|
||||||
printf "%s│%s\n" "$i" "${tabled[$i]}"
|
printf "%s│▶%s\n" "$i" "${tabled[$i]}"
|
||||||
else
|
else
|
||||||
printf "%s│ %s\n" "$i" "${tabled[$i]}"
|
printf "%s│ %s\n" "$i" "${tabled[$i]}"
|
||||||
fi
|
fi
|
||||||
|
@ -182,14 +182,14 @@ move_files(){
|
||||||
rm -r "$staging_dir"/steamapps
|
rm -r "$staging_dir"/steamapps
|
||||||
}
|
}
|
||||||
auto_mod_download(){
|
auto_mod_download(){
|
||||||
sudo su -c "steamcmd +force_install_dir $staging_dir +login $steam_username $(steamcmd_modlist) +quit" $steamcmd_user
|
sudo -iu steam bash -c "$steamcmd_path +force_install_dir $staging_dir +login $steam_username $(steamcmd_modlist) +quit" $steamcmd_user
|
||||||
[[ "$(ls -A $staging_dir/steamapps)" ]] && move_files || return 1
|
[[ "$(ls -A $staging_dir/steamapps)" ]] && move_files || return 1
|
||||||
}
|
}
|
||||||
find_steam_cmd(){
|
find_steam_cmd(){
|
||||||
for i in "/home/steam" "/usr/share" "/usr/bin" "/"; do
|
for i in "/home/steam" "/usr/share" "/usr/bin" "/"; do
|
||||||
steamcmd_path=$(sudo find "$i" -name steamcmd.sh 2>/dev/null | grep -v linux32 | head -n1)
|
steamcmd_path=$(sudo find "$i" -name steamcmd.sh 2>/dev/null | grep -v linux32 | head -n1)
|
||||||
if [[ -n "$steamcmd_path" ]]; then
|
if [[ -n "$steamcmd_path" ]]; then
|
||||||
printf "[INFO] Found steamcmd at '$steamcmd_path'"
|
printf "[INFO] Found steamcmd at '$steamcmd_path'\n"
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
return 1
|
return 1
|
||||||
|
@ -211,7 +211,7 @@ auto_mod_install(){
|
||||||
if [[ $? -eq 1 ]]; then
|
if [[ $? -eq 1 ]]; then
|
||||||
err "steamcmd not found. See: https://developer.valvesoftware.com/wiki/SteamCMD"
|
err "steamcmd not found. See: https://developer.valvesoftware.com/wiki/SteamCMD"
|
||||||
else
|
else
|
||||||
printf "[INFO] Found steamcmd. Downloading mods\n"
|
printf "[INFO] Downloading mods\n"
|
||||||
revert_msg="Something went wrong. Reverting to manual mode"
|
revert_msg="Something went wrong. Reverting to manual mode"
|
||||||
auto_mod_download
|
auto_mod_download
|
||||||
if [[ $? -eq 0 ]]; then
|
if [[ $? -eq 0 ]]; then
|
||||||
|
|
Loading…
Reference in a new issue