mirror of
https://github.com/aclist/dztui.git
synced 2024-12-29 13:52:03 +01:00
Remove stash lines
This commit is contained in:
parent
c2c907ac0a
commit
1c401cd064
1 changed files with 3 additions and 33 deletions
36
dzgui.sh
36
dzgui.sh
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
version=2.7.0-rc.26
|
version=2.8.0-rc.1
|
||||||
|
|
||||||
aid=221100
|
aid=221100
|
||||||
game="dayz"
|
game="dayz"
|
||||||
|
@ -173,15 +173,12 @@ steam_api="$steam_api"
|
||||||
|
|
||||||
#Terminal emulator
|
#Terminal emulator
|
||||||
term="$term"
|
term="$term"
|
||||||
<<<<<<< Updated upstream
|
|
||||||
=======
|
|
||||||
|
|
||||||
#Auto-install mods
|
#Auto-install mods
|
||||||
auto_install="$auto_install"
|
auto_install="$auto_install"
|
||||||
|
|
||||||
#Automod staging directory
|
#Automod staging directory
|
||||||
staging_dir="/tmp"
|
staging_dir="/tmp"
|
||||||
>>>>>>> Stashed changes
|
|
||||||
END
|
END
|
||||||
}
|
}
|
||||||
write_desktop_file(){
|
write_desktop_file(){
|
||||||
|
@ -369,18 +366,11 @@ set_term(){
|
||||||
source $config_file
|
source $config_file
|
||||||
}
|
}
|
||||||
sel_term(){
|
sel_term(){
|
||||||
<<<<<<< Updated upstream
|
|
||||||
#only terminals known to support -e flag
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
if [[ $is_steam_deck -eq 1 ]]; then
|
if [[ $is_steam_deck -eq 1 ]]; then
|
||||||
set_term konsole
|
set_term konsole
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
<<<<<<< Updated upstream
|
|
||||||
=======
|
|
||||||
#only terminals known to support -e flag
|
#only terminals known to support -e flag
|
||||||
>>>>>>> Stashed changes
|
|
||||||
for i in "$TERMINAL" urxvt alacritty konsole gnome-terminal terminator xfce4-terminal xterm st tilix; do
|
for i in "$TERMINAL" urxvt alacritty konsole gnome-terminal terminator xfce4-terminal xterm st tilix; do
|
||||||
[[ $(command -v $i) ]] && terms+=($i)
|
[[ $(command -v $i) ]] && terms+=($i)
|
||||||
done
|
done
|
||||||
|
@ -389,24 +379,13 @@ sel_term(){
|
||||||
term=$(echo "$terms" | zenity --list --column=Terminal --height=800 --width=1200 --text="Select your preferred terminal emulator to run steamcmd (setting will be saved)" --title=DZGUI)
|
term=$(echo "$terms" | zenity --list --column=Terminal --height=800 --width=1200 --text="Select your preferred terminal emulator to run steamcmd (setting will be saved)" --title=DZGUI)
|
||||||
}
|
}
|
||||||
auto_mod_install(){
|
auto_mod_install(){
|
||||||
<<<<<<< Updated upstream
|
|
||||||
# disksize=$(df $staging_dir --output=avail | tail -n1)
|
|
||||||
# bytewise=$((disksize * 1024))
|
|
||||||
# hr=$(echo $(numfmt --to=iec --format "%8.1f" $bytewise $totalmodsize) | sed 's/ /\//')
|
|
||||||
# if [[ $totalmodsize -gt $bytewise ]]; then printf "[ERROR] Not enough space in /tmp to automatically stage mods: %s\n" $hr
|
|
||||||
=======
|
|
||||||
[[ ! $auto_install -eq 1 ]] && return 1
|
[[ ! $auto_install -eq 1 ]] && return 1
|
||||||
>>>>>>> Stashed changes
|
|
||||||
cmd=$(printf "%q " "$@")
|
cmd=$(printf "%q " "$@")
|
||||||
if [[ -z "$term" ]]; then
|
if [[ -z "$term" ]]; then
|
||||||
sel_term && set_term "$term"
|
sel_term && set_term "$term"
|
||||||
fi
|
fi
|
||||||
echo "[DZGUI] Kicking off auto mod script"
|
echo "[DZGUI] Kicking off auto mod script"
|
||||||
<<<<<<< Updated upstream
|
|
||||||
$term -e bash -c "/$helpers_path/scmd.sh $cmd"
|
|
||||||
=======
|
|
||||||
$term -e bash -c "/$helpers_path/scmd.sh $totalmodsize $cmd"
|
$term -e bash -c "/$helpers_path/scmd.sh $totalmodsize $cmd"
|
||||||
>>>>>>> Stashed changes
|
|
||||||
compare
|
compare
|
||||||
if [[ -z $diff ]]; then
|
if [[ -z $diff ]]; then
|
||||||
passed_mod_check > >(zenity --pulsate --progress --auto-close --width=500 2>/dev/null)
|
passed_mod_check > >(zenity --pulsate --progress --auto-close --width=500 2>/dev/null)
|
||||||
|
@ -477,7 +456,6 @@ passed_mod_check(){
|
||||||
legacy_symlinks
|
legacy_symlinks
|
||||||
symlinks
|
symlinks
|
||||||
echo "100"
|
echo "100"
|
||||||
launch
|
|
||||||
|
|
||||||
}
|
}
|
||||||
connect(){
|
connect(){
|
||||||
|
@ -508,6 +486,7 @@ connect(){
|
||||||
[[ $rc -eq 1 ]] && manual_mod_install
|
[[ $rc -eq 1 ]] && manual_mod_install
|
||||||
else
|
else
|
||||||
passed_mod_check > >(zenity --pulsate --progress --auto-close --width=500 2>/dev/null)
|
passed_mod_check > >(zenity --pulsate --progress --auto-close --width=500 2>/dev/null)
|
||||||
|
launch
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
fetch_mods(){
|
fetch_mods(){
|
||||||
|
@ -660,19 +639,10 @@ query_defunct(){
|
||||||
post(){
|
post(){
|
||||||
curl -s -X POST -H "Content-Type:application/x-www-form-urlencoded" -d "$(payload)" 'https://api.steampowered.com/ISteamRemoteStorage/GetPublishedFileDetails/v1/?format=json'
|
curl -s -X POST -H "Content-Type:application/x-www-form-urlencoded" -d "$(payload)" 'https://api.steampowered.com/ISteamRemoteStorage/GetPublishedFileDetails/v1/?format=json'
|
||||||
}
|
}
|
||||||
<<<<<<< Updated upstream
|
|
||||||
readarray -t newlist <<< $(post | jq -r '.[].publishedfiledetails[] | select(.result==1) .publishedfileid')
|
|
||||||
#FIXME:
|
|
||||||
#result=$(post | jq -r '.[].publishedfiledetails[] | select(.result==1) | "\(.file_size) \(.publishedfileid)"')
|
|
||||||
#readarray -t newlist <<< $(echo -e "$result" | awk '{print $2}')
|
|
||||||
#totalmodsize=$(echo -e "$result" | awk '{s+=$1}END{print s}')
|
|
||||||
#prompt to proceed anyway
|
|
||||||
=======
|
|
||||||
result=$(post | jq -r '.[].publishedfiledetails[] | select(.result==1) | "\(.file_size) \(.publishedfileid)"')
|
result=$(post | jq -r '.[].publishedfiledetails[] | select(.result==1) | "\(.file_size) \(.publishedfileid)"')
|
||||||
totalmodsize=$(echo -e "$result" | awk '{s+=$1}END{print s}')
|
totalmodsize=$(echo -e "$result" | awk '{s+=$1}END{print s}')
|
||||||
readarray -t newlist <<< $(echo -e "$result" | awk '{print $2}')
|
readarray -t newlist <<< $(echo -e "$result" | awk '{print $2}')
|
||||||
#readarray -t newlist <<< $(post | jq -r '.[].publishedfiledetails[] | select(.result==1) .publishedfileid')
|
#readarray -t newlist <<< $(post | jq -r '.[].publishedfiledetails[] | select(.result==1) .publishedfileid')
|
||||||
>>>>>>> Stashed changes
|
|
||||||
}
|
}
|
||||||
validate_mods(){
|
validate_mods(){
|
||||||
url="https://steamcommunity.com/sharedfiles/filedetails/?id="
|
url="https://steamcommunity.com/sharedfiles/filedetails/?id="
|
||||||
|
@ -1378,7 +1348,7 @@ enforce_dl(){
|
||||||
download_new_version > >(zenity --progress --pulsate --auto-close --no-cancel --width=500)
|
download_new_version > >(zenity --progress --pulsate --auto-close --no-cancel --width=500)
|
||||||
}
|
}
|
||||||
prompt_dl(){
|
prompt_dl(){
|
||||||
zenity --question --title="DZGUI" --text "Version conflict.\n\nYour branch:\t\t\t$branch\nYour version\t\t\t$version\nUpstream version:\t\t$upstream\n\nVersion updates introduce important bug fixes and are encouraged.\n\nAttempt to download latest version?" --width=500 --ok-label="Yes" --cancel-label="No" 2>/dev/null
|
zenity --question --title="DZGUI" --text "Version conflict.\n\nYour branch:\t\t$branch\nYour version\t\t$version\nUpstream version:\t\t$upstream\n\nVersion updates introduce important bug fixes and are encouraged.\n\nAttempt to download latest version?" --width=500 --ok-label="Yes" --cancel-label="No" 2>/dev/null
|
||||||
rc=$?
|
rc=$?
|
||||||
if [[ $rc -eq 1 ]]; then
|
if [[ $rc -eq 1 ]]; then
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue