I made double square brackets everywhere (they work faster), ! -z passed to -n, ! -n to z
This commit is contained in:
@ -2,12 +2,12 @@
|
||||
# Author: chal55rus (Sergey P.), cefeiko, Castro-Fidel (linux-gaming.ru)
|
||||
##########################################################################
|
||||
pw_shutdown_please () {
|
||||
if [ "$PW_USE_RUNTIME" != 1 ]
|
||||
if [[ "$PW_USE_RUNTIME" != 1 ]]
|
||||
then echo "PW_USE_RUNTIME: `echo $PW_USE_RUNTIME`"
|
||||
else
|
||||
sleep 10
|
||||
while true ; do
|
||||
if [ -z "`ps aux | grep -v grep | grep -wm 1 "$1" | awk '{print $2}'`" ] && [ ! -z "`pgrep wrap | head -n 1`" ]; then
|
||||
if [[ -z "`ps aux | grep -v grep | grep -wm 1 "$1" | awk '{print $2}'`" ]] && [[ -n "`pgrep wrap | head -n 1`" ]] ; then
|
||||
echo -e "PID "$1" not found"
|
||||
sleep 1
|
||||
else
|
||||
|
@ -12,7 +12,7 @@ export PW_AUTOINSTALL_EXE="${WINEPREFIX}/drive_c/Program Files (x86)/OSU/osu!.ex
|
||||
if try_download "https://m1.ppy.sh/r/osu!install.exe" "${PW_AUTOINSTALL_EXE}" no_mirror
|
||||
then
|
||||
pw_start_progress_bar_install_game "OSU!."
|
||||
if [ -f "${PORT_WINE_PATH}/data/pfx_dotnet/drive_c/Program Files (x86)/OSU/osu!install.exe" ]; then
|
||||
if [[ -f "${PORT_WINE_PATH}/data/pfx_dotnet/drive_c/Program Files (x86)/OSU/osu!install.exe" ]] ; then
|
||||
mv -f "${PORT_WINE_PATH}/data/pfx_dotnet/drive_c/Program Files (x86)/OSU/osu!install.exe" "${PORT_WINE_PATH}/data/pfx_dotnet/drive_c/Program Files (x86)/OSU/osu!.exe"
|
||||
fi
|
||||
export portwine_exe="$WINEPREFIX/drive_c/Program Files (x86)/OSU/osu!.exe"
|
||||
|
@ -9,7 +9,7 @@ then
|
||||
pw_start_progress_bar_install_game "Steam."
|
||||
pw_kill_autostart steam.exe &
|
||||
pw_run "${PW_AUTOINSTALL_EXE}"
|
||||
if [ -f "$WINEPREFIX/drive_c/Program Files (x86)/Steam/Steam.exe" ]
|
||||
if [[ -f "$WINEPREFIX/drive_c/Program Files (x86)/Steam/Steam.exe" ]]
|
||||
then mv -f "$WINEPREFIX/drive_c/Program Files (x86)/Steam/Steam.exe" "$WINEPREFIX/drive_c/Program Files (x86)/Steam/steam.exe"
|
||||
fi
|
||||
portwine_exe="$WINEPREFIX/drive_c/Program Files (x86)/Steam/steam.exe"
|
||||
|
@ -7,7 +7,7 @@ export PW_VULKAN_USE=1
|
||||
export PW_AUTOINSTALL_EXE="${PW_USER_TEMP}/wos_client.exe"
|
||||
|
||||
WOSB_VERSION="$(curl -s --list-only --connect-timeout 3 https://www.worldofseabattle.com/download2 2>/dev/null | grep 'installer.exe' | awk -F'xsolla-launcher-update/' '{print $2}' | awk -F'/' '{print $1}')"
|
||||
[[ ! -z "$WOSB_VERSION" ]] && print_info "Found version: $WOSB_VERSION" || yad_error "Error while get version of WOSB INSTALLER."
|
||||
[[ -n "$WOSB_VERSION" ]] && print_info "Found version: $WOSB_VERSION" || yad_error "Error while get version of WOSB INSTALLER."
|
||||
|
||||
start_portwine
|
||||
if try_download "https://installer.launcher.xsolla.com/xlauncher-builds/xsolla-launcher-update/${WOSB_VERSION}/bin/installer.exe" "${PW_AUTOINSTALL_EXE}" no_mirror
|
||||
|
Reference in New Issue
Block a user