From 24582eeb74597b5dc2a0bc8f4766460e87440088 Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Thu, 30 Nov 2023 22:39:36 +0100 Subject: [PATCH] Revert "== > =" This reverts commit 28e8adc03d7d2bdb78fd827cab4184eef244c027. --- darwin/functions/helperFunctions.sh | 4 +- darwin/functions/overrides/emuDeckESDE.sh | 14 +- darwin/functions/overrides/helperFunctions.sh | 4 +- flatpakupdate/flatpakupdate.sh | 74 +++++----- functions/EmuScripts/emuDeckCemu.sh | 4 +- functions/EmuScripts/emuDeckCemuNative.sh | 4 +- functions/EmuScripts/emuDeckDolphin.sh | 2 +- functions/EmuScripts/emuDeckDuckStation.sh | 4 +- functions/EmuScripts/emuDeckFlycast.sh | 2 +- functions/EmuScripts/emuDeckPCSX2QT.sh | 2 +- functions/EmuScripts/emuDeckRPCS3.sh | 2 +- functions/EmuScripts/emuDeckRetroArch.sh | 24 ++-- functions/EmuScripts/emuDeckXemu.sh | 2 +- functions/EmuScripts/emuDeckXenia.sh | 6 +- .../remotePlayChiaki.sh | 4 +- .../remotePlayMoonlight.sh | 4 +- .../remotePlayParsec.sh | 4 +- functions/ToolScripts/emuDeckCloudBackup.sh | 28 ++-- functions/ToolScripts/emuDeckCloudSync.sh | 30 ++--- functions/ToolScripts/emuDeckESDE.sh | 30 ++--- functions/ToolScripts/emuDeckMigration.sh | 2 +- functions/ToolScripts/emuDeckPlugins.sh | 2 +- functions/ToolScripts/emuDeckSRM.sh | 34 ++--- functions/ToolScripts/emuDecky.sh | 14 +- functions/all.sh | 2 +- functions/appImageInit.sh | 2 +- functions/checkBIOS.sh | 24 ++-- functions/cloudServicesManager.sh | 48 +++---- functions/configEmuAI.sh | 2 +- functions/configEmuFP.sh | 2 +- functions/dialogBox.sh | 4 +- functions/helperFunctions.sh | 38 +++--- functions/installEmuAI.sh | 2 +- functions/installEmuBI.sh | 2 +- functions/installEmuFP.sh | 2 +- functions/installToolAI.sh | 4 +- functions/migrateAndLinkConfig.sh | 10 +- install-darwin.sh | 12 +- install.sh | 4 +- installCLI.sh | 14 +- setup.sh | 126 +++++++++--------- tools/appID.py | 2 +- tools/binupdate/binupdate.sh | 50 +++---- tools/chdconv/chddeck.sh | 18 +-- tools/cloudSync/cloud_sync_watcher.sh | 8 +- tools/emu-launch.sh | 2 +- tools/flatpakupdate/flatpakupdate.sh | 68 +++++----- tools/launcherFunctions.sh | 4 +- tools/launchers/cemu.sh | 12 +- tools/launchers/mgba.sh | 2 +- tools/launchers/pcsx2-qt.sh | 2 +- tools/launchers/ryujinx.sh | 2 +- tools/proton-launch.sh | 10 +- tools/scrapers/launchbox.sh | 12 +- tools/scrapers/retroarch.sh | 4 +- tools/scrapers/screenscraper.sh | 20 +-- uninstall.sh | 90 ++++++------- whiptail/AspectRatio3DPage.sh | 2 +- whiptail/AspectRatioDolphinPage.sh | 2 +- whiptail/AspectRatioSegaPage.sh | 2 +- whiptail/CHDToolPage.sh | 2 +- whiptail/ChangeLogPage.sh | 2 +- whiptail/CheckBiosPage.sh | 2 +- whiptail/EmuGuidePage.sh | 2 +- whiptail/EmulatorSelectorPage.sh | 14 +- whiptail/EndPage.sh | 10 +- whiptail/ErrorPage.sh | 2 +- whiptail/PegasusInstallPage.sh | 12 +- whiptail/PegasusThemePage.sh | 10 +- whiptail/RABezelsPage.sh | 4 +- whiptail/RAConfigPage.sh | 2 +- whiptail/ResetPage.sh | 2 +- whiptail/RomStoragePage.sh | 4 +- whiptail/SettingsPage.sh | 2 +- whiptail/Shaders2DPage.sh | 2 +- whiptail/ShadersHandheldsPage.sh | 2 +- whiptail/UninstallPage.sh | 2 +- whiptail/UpdateEmusPage.sh | 2 +- whiptail/WelcomePage.sh | 2 +- 79 files changed, 495 insertions(+), 495 deletions(-) diff --git a/darwin/functions/helperFunctions.sh b/darwin/functions/helperFunctions.sh index 3c3db49f..46d9bf7f 100644 --- a/darwin/functions/helperFunctions.sh +++ b/darwin/functions/helperFunctions.sh @@ -9,7 +9,7 @@ darwin_installEmuDMG(){ local showProgress="$4" local lastVerFile="$5" local latestVer="$6" - if [[ "$altName" = "" ]]; then + if [[ "$altName" == "" ]]; then altName="$name" fi echo "$name" @@ -58,7 +58,7 @@ installEmuZip(){ local showProgress="$4" local lastVerFile="$5" local latestVer="$6" - if [[ "$altName" = "" ]]; then + if [[ "$altName" == "" ]]; then altName="$name" fi diff --git a/darwin/functions/overrides/emuDeckESDE.sh b/darwin/functions/overrides/emuDeckESDE.sh index 71fed5e9..c86b8006 100644 --- a/darwin/functions/overrides/emuDeckESDE.sh +++ b/darwin/functions/overrides/emuDeckESDE.sh @@ -2,14 +2,14 @@ ESDE_SetAppImageURLS() { local json="$(curl -s $ESDE_releaseJSON)" - if [ appleChip = 'arm64' ]; then - ESDE_releaseURL=$(echo "$json" | jq -r '.stable.packages[] | select(.name = "macOSApple") | .url') + if [ appleChip == 'arm64' ]; then + ESDE_releaseURL=$(echo "$json" | jq -r '.stable.packages[] | select(.name == "macOSApple") | .url') else - ESDE_releaseURL=$(echo "$json" | jq -r '.stable.packages[] | select(.name = "macOSApple") | .url') + ESDE_releaseURL=$(echo "$json" | jq -r '.stable.packages[] | select(.name == "macOSApple") | .url') fi # - # ESDE_releaseURL=$(echo "$json" | jq -r '.stable.packages[] | select(.name = "LinuxSteamDeckAppImage") | .url') - # ESDE_releaseMD5=$(echo "$json" | jq -r '.stable.packages[] | select(.name = "LinuxSteamDeckAppImage") | .md5') - # ESDE_prereleaseURL=$(echo "$json" | jq -r '.prerelease.packages[] | select(.name = "LinuxSteamDeckAppImage") | .url') - # ESDE_prereleaseMD5=$(echo "$json" | jq -r '.prerelease.packages[] | select(.name = "LinuxSteamDeckAppImage") | .md5') + # ESDE_releaseURL=$(echo "$json" | jq -r '.stable.packages[] | select(.name == "LinuxSteamDeckAppImage") | .url') + # ESDE_releaseMD5=$(echo "$json" | jq -r '.stable.packages[] | select(.name == "LinuxSteamDeckAppImage") | .md5') + # ESDE_prereleaseURL=$(echo "$json" | jq -r '.prerelease.packages[] | select(.name == "LinuxSteamDeckAppImage") | .url') + # ESDE_prereleaseMD5=$(echo "$json" | jq -r '.prerelease.packages[] | select(.name == "LinuxSteamDeckAppImage") | .md5') } \ No newline at end of file diff --git a/darwin/functions/overrides/helperFunctions.sh b/darwin/functions/overrides/helperFunctions.sh index 8da46bfb..b7e54f09 100644 --- a/darwin/functions/overrides/helperFunctions.sh +++ b/darwin/functions/overrides/helperFunctions.sh @@ -6,7 +6,7 @@ safeDownload() { local outFile="$3" local showProgress="$4" local headers="$5" - if [ "$showProgress" = "true" ]; then + if [ "$showProgress" == "true" ]; then echo "safeDownload()" echo "- $name" echo "- $url" @@ -21,7 +21,7 @@ safeDownload() { httpCode="${returnCodes%$'\2'*}" exitCode="${returnCodes#*$'\2'}" - if [ "$httpCode" = "200" ] && [ "$exitCode" = "0" ]; then + if [ "$httpCode" = "200" ] && [ "$exitCode" == "0" ]; then #echo "$name downloaded successfully"; mv -v "$outFile.temp" "$outFile" &>/dev/null volumeName=$(yes | hdiutil attach "$outFile" | grep -o '/Volumes/.*$') diff --git a/flatpakupdate/flatpakupdate.sh b/flatpakupdate/flatpakupdate.sh index efbe1a6f..07143af0 100644 --- a/flatpakupdate/flatpakupdate.sh +++ b/flatpakupdate/flatpakupdate.sh @@ -1,6 +1,6 @@ #!/bin/bash . "$HOME/.config/EmuDeck/backend/functions/all.sh" -if [ "$?" = "1" ]; then +if [ "$?" == "1" ]; then echo "functions could not be loaded." zenity --error \ --text="EmuDeck Functions could not be loaded. Please re-run Emudeck install." 2>/dev/null @@ -8,43 +8,43 @@ if [ "$?" = "1" ]; then fi emuTable=() -if [ "$(RetroArch_IsInstalled)" = "true" ]; then +if [ "$(RetroArch_IsInstalled)" == "true" ]; then emuTable+=(TRUE "Multiple" "RetroArch") fi -if [ "$(Primehack_IsInstalled)" = "true" ]; then +if [ "$(Primehack_IsInstalled)" == "true" ]; then emuTable+=(TRUE "Metroid Prime" "PrimeHack") fi -if [ "$(RPCS3_IsInstalled)" = "true" ]; then +if [ "$(RPCS3_IsInstalled)" == "true" ]; then emuTable+=(TRUE "PS3" "RPCS3") fi -if [ "$(Citra_IsInstalled)" = "true" ]; then +if [ "$(Citra_IsInstalled)" == "true" ]; then emuTable+=(TRUE "3DS" "Citra") fi -if [ "$(Dolphin_IsInstalled)" = "true" ]; then +if [ "$(Dolphin_IsInstalled)" == "true" ]; then emuTable+=(TRUE "GC/Wii" "Dolphin") fi -if [ "$(DuckStation_IsInstalled)" = "true" ]; then +if [ "$(DuckStation_IsInstalled)" == "true" ]; then emuTable+=(TRUE "PSX" "DuckStation") fi -if [ "$(PPSSPP_IsInstalled)" = "true" ]; then +if [ "$(PPSSPP_IsInstalled)" == "true" ]; then emuTable+=(TRUE "PSP" "PPSSPP") fi -if [ "$(Xemu_IsInstalled)" = "true" ]; then +if [ "$(Xemu_IsInstalled)" == "true" ]; then emuTable+=(TRUE "XBox" "Xemu") fi -if [ "$(ScummVM_IsInstalled)" = "true" ]; then +if [ "$(ScummVM_IsInstalled)" == "true" ]; then emuTable+=(TRUE "Scumm/DOS" "ScummVM") fi -if [ "$(RMG_IsInstalled)" = "true" ]; then +if [ "$(RMG_IsInstalled)" == "true" ]; then emuTable+=(TRUE "N64" "RMG") fi -if [ "$(melonDS_IsInstalled)" = "true" ]; then +if [ "$(melonDS_IsInstalled)" == "true" ]; then emuTable+=(TRUE "DS" "melonDS") fi -if [ "$(ares_IsInstalled)" = "true" ]; then +if [ "$(ares_IsInstalled)" == "true" ]; then emuTable+=(TRUE "Multi-System Emulator" "ares") fi @@ -75,92 +75,92 @@ if [ "${#emuTable[@]}" -gt 0 ]; then echo "User selected: $emusToInstall" - if [[ "$emusToInstall" = *"RetroArch"* ]]; then + if [[ "$emusToInstall" == *"RetroArch"* ]]; then doUpdateRA=true fi - if [[ "$emusToInstall" = *"PrimeHack"* ]]; then + if [[ "$emusToInstall" == *"PrimeHack"* ]]; then doUpdatePrimeHack=true fi - if [[ "$emusToInstall" = *"RPCS3"* ]]; then + if [[ "$emusToInstall" == *"RPCS3"* ]]; then doUpdateRPCS3=true fi - if [[ "$emusToInstall" = *"Citra"* ]]; then + if [[ "$emusToInstall" == *"Citra"* ]]; then doUpdateCitra=true fi - if [[ "$emusToInstall" = *"Dolphin"* ]]; then + if [[ "$emusToInstall" == *"Dolphin"* ]]; then doUpdateDolphin=true fi - if [[ "$emusToInstall" = *"DuckStation"* ]]; then + if [[ "$emusToInstall" == *"DuckStation"* ]]; then doUpdateDuck=true fi - if [[ "$emusToInstall" = *"PPSSPP"* ]]; then + if [[ "$emusToInstall" == *"PPSSPP"* ]]; then doUpdatePPSSPP=true fi - if [[ "$emusToInstall" = *"Xemu"* ]]; then + if [[ "$emusToInstall" == *"Xemu"* ]]; then doUpdateXemu=true fi - if [[ "$emusToInstall" = *"ScummVM"* ]]; then + if [[ "$emusToInstall" == *"ScummVM"* ]]; then doUpdateScummVM=true fi - if [[ "$emusToInstall" = *"MelonDS"* ]]; then + if [[ "$emusToInstall" == *"MelonDS"* ]]; then doUpdateMelonDS=true fi - if [[ "$emusToInstall" = *"RMG"* ]]; then + if [[ "$emusToInstall" == *"RMG"* ]]; then doUpdateRMG=true fi - if [[ "$emusToInstall" = *"ares"* ]]; then + if [[ "$emusToInstall" == *"ares"* ]]; then doUpdateares=true fi ( progressInstalled="" - if [ "$doUpdateRA" = "true" ]; then + if [ "$doUpdateRA" == "true" ]; then echo "###Updating RetroArch..." (updateEmuFP "RetroArch" "org.libretro.RetroArch" || true) && let progresspct+=$pct && echo "%%%$progresspct" && progressInstalled+="|RetroArch" && echo "&&&$progressInstalled" fi - if [ "$doUpdatePrimeHack" = "true" ]; then + if [ "$doUpdatePrimeHack" == "true" ]; then echo "###Updating PrimeHack..." (updateEmuFP "PrimeHack" "io.github.shiiion.primehack" || true) && let progresspct+=$pct && echo "%%%$progresspct" && progressInstalled+="|PrimeHack" && echo "&&&$progressInstalled" fi - if [ "$doUpdateRPCS3" = "true" ]; then + if [ "$doUpdateRPCS3" == "true" ]; then echo "###Updating RPCS3..." (updateEmuFP "RPCS3" "net.rpcs3.RPCS3" || true) && let progresspct+=$pct && echo "%%%$progresspct" && progressInstalled+="|RPCS3" && echo "&&&$progressInstalled" fi - if [ "$doUpdateCitra" = "true" ]; then + if [ "$doUpdateCitra" == "true" ]; then echo "###Updating Citra..." (updateEmuFP "Citra" "org.citra_emu.citra" || true) && let progresspct+=$pct && echo "%%%$progresspct" && progressInstalled+="|Citra" && echo "&&&$progressInstalled" fi - if [ "$doUpdateDolphin" = "true" ]; then + if [ "$doUpdateDolphin" == "true" ]; then echo "###Updating Dolphin..." (updateEmuFP "dolphin-emu" "org.DolphinEmu.dolphin-emu" || true) && let progresspct+=$pct && echo "%%%$progresspct" && progressInstalled+="|Dolphin" && echo "&&&$progressInstalled" fi - if [ "$doUpdateDuck" = "true" ]; then + if [ "$doUpdateDuck" == "true" ]; then echo "###Updating DuckStation..." (updateEmuFP "DuckStation" "org.duckstation.DuckStation" || true) && let progresspct+=$pct && echo "%%%$progresspct" && progressInstalled+="|DuckStation" && echo "&&&$progressInstalled" fi - if [ "$doUpdatePPSSPP" = "true" ]; then + if [ "$doUpdatePPSSPP" == "true" ]; then echo "###Updating PPSSPP..." (updateEmuFP "PPSSPP" "org.ppsspp.PPSSPP" || true) && let progresspct+=$pct && echo "%%%$progresspct" && progressInstalled+="|PPSSPP" && echo "&&&$progressInstalled" fi - if [ "$doUpdateXemu" = "true" ]; then + if [ "$doUpdateXemu" == "true" ]; then echo "###Updating Xemu..." (updateEmuFP "Xemu-Emu" "app.xemu.xemu" || true) && let progresspct+=$pct && echo "%%%$progresspct" && progressInstalled+="|Xemu" && echo "&&&$progressInstalled" fi - if [ "$doUpdateScummVM" = "true" ]; then + if [ "$doUpdateScummVM" == "true" ]; then echo "###Updating ScummVM..." (updateEmuFP "ScummVM" "org.scummvm.ScummVM" || true) && let progresspct+=$pct && echo "%%%$progresspct" && progressInstalled+="|ScummVM" && echo "&&&$progressInstalled" fi - if [ "$doUpdateMelonDS" = "true" ]; then + if [ "$doUpdateMelonDS" == "true" ]; then echo "###Updating melonDS..." (updateEmuFP "melonDS" "net.kuribo64.melonDS" || true) && let progresspct+=$pct && echo "%%%$progresspct" && progressInstalled+="|melonDS" && echo "&&&$progressInstalled" fi - if [ "$doUpdateRMG" = "true" ]; then + if [ "$doUpdateRMG" == "true" ]; then echo "###Updating RMG..." (updateEmuFP "RMG" "com.github.Rosalie241.RMG" || true) && let progresspct+=$pct && echo "%%%$progresspct" && progressInstalled+="|RMG" && echo "&&&$progressInstalled" fi - if [ "$doUpdateares" = "true" ]; then + if [ "$doUpdateares" == "true" ]; then echo "###Updating ares..." (updateEmuFP "ares" "dev.ares.ares" || true) && let progresspct+=$pct && echo "%%%$progresspct" && progressInstalled+="|ares" && echo "&&&$progressInstalled" fi diff --git a/functions/EmuScripts/emuDeckCemu.sh b/functions/EmuScripts/emuDeckCemu.sh index 71953ea8..14eeae09 100644 --- a/functions/EmuScripts/emuDeckCemu.sh +++ b/functions/EmuScripts/emuDeckCemu.sh @@ -39,7 +39,7 @@ Cemu_install(){ sed -i "s|/run/media/mmcblk0p1/Emulation/tools|${toolsPath}|g" "${toolsPath}/launchers/cemu.sh" sed -i "s|/run/media/mmcblk0p1/Emulation/roms|${romsPath}|" "${toolsPath}/launchers/cemu.sh" -# if [[ "$launchLine" = *"PROTONLAUNCH"* ]]; then +# if [[ "$launchLine" == *"PROTONLAUNCH"* ]]; then # changeLine '"${PROTONLAUNCH}"' "$launchLine" "${toolsPath}/launchers/cemu.sh" # fi chmod +x "${toolsPath}/launchers/cemu.sh" @@ -92,7 +92,7 @@ Cemu_setEmulationFolder(){ #WindowsRomPath=${echo "z:${romsPath}/wiiu/roms" | sed 's/\//\\/g'} #gamePathEntryFound=$(grep -rnw "$Cemu_cemuSettings" -e "${WindowsRomPath}") gamePathEntryFound=$(grep -rnw "$Cemu_cemuSettings" -e "z:${romsPath}/wiiu/roms") - if [[ $gamePathEntryFound = '' ]]; then + if [[ $gamePathEntryFound == '' ]]; then #xmlstarlet ed --inplace --subnode "content/GamePaths" --type elem -n Entry -v "${WindowsRomPath}" "$Cemu_cemuSettings" xmlstarlet ed --inplace --subnode "content/GamePaths" --type elem -n Entry -v "z:${romsPath}/wiiu/roms" "$Cemu_cemuSettings" fi diff --git a/functions/EmuScripts/emuDeckCemuNative.sh b/functions/EmuScripts/emuDeckCemuNative.sh index bcf69482..edc7d862 100644 --- a/functions/EmuScripts/emuDeckCemuNative.sh +++ b/functions/EmuScripts/emuDeckCemuNative.sh @@ -150,7 +150,7 @@ CemuNative_functions () { #gamepath gamePathEntryFound="$( xmlstarlet sel -t -m "content/GamePaths/Entry" -v . -n "${CemuNative[configFile]}" )" - if [[ ! "${gamePathEntryFound}" = *"${romsPath}/wiiu/roms"* ]]; then + if [[ ! "${gamePathEntryFound}" == *"${romsPath}/wiiu/roms"* ]]; then xmlstarlet ed --inplace --subnode "content/GamePaths" --type elem -n Entry -v "${romsPath}/wiiu/roms/" "${CemuNative[configFile]}" #while we use both native and proton, i don't want to change the wiiu folder structure. fi @@ -158,7 +158,7 @@ CemuNative_functions () { mlcEntryFound="$( xmlstarlet sel -t -m "content/mlc_path" -v . -n "${CemuNative[configFile]}" )" local mlcPath="${romsPath}/wiiu/mlc01" - if [[ ! "${mlcEntryFound}" = *"${mlcPath}"* ]]; then + if [[ ! "${mlcEntryFound}" == *"${mlcPath}"* ]]; then xmlstarlet ed --inplace -u "content/mlc_path" -v "${romsPath}/wiiu/mlc01" "${CemuNative[configFile]}" #while we use both native and proton, i don't want to change the wiiu folder structure. fi fi diff --git a/functions/EmuScripts/emuDeckDolphin.sh b/functions/EmuScripts/emuDeckDolphin.sh index 0cece4ab..f32c27d2 100644 --- a/functions/EmuScripts/emuDeckDolphin.sh +++ b/functions/EmuScripts/emuDeckDolphin.sh @@ -180,7 +180,7 @@ Dolphin_DynamicInputTextures(){ } Dolphin_setCustomizations(){ - if [ "$arDolphin" = 169 ]; then + if [ "$arDolphin" == 169 ]; then Dolphin_wideScreenOn else Dolphin_wideScreenOff diff --git a/functions/EmuScripts/emuDeckDuckStation.sh b/functions/EmuScripts/emuDeckDuckStation.sh index 174ef7f9..4338e372 100644 --- a/functions/EmuScripts/emuDeckDuckStation.sh +++ b/functions/EmuScripts/emuDeckDuckStation.sh @@ -191,7 +191,7 @@ DuckStation_retroAchievementsSetLogin(){ DuckStation_setRetroAchievements(){ DuckStation_retroAchievementsSetLogin - if [ "$achievementsHardcore" = "true" ]; then + if [ "$achievementsHardcore" == "true" ]; then DuckStation_retroAchievementsHardCoreOn else DuckStation_retroAchievementsHardCoreOff @@ -199,7 +199,7 @@ DuckStation_setRetroAchievements(){ } DuckStation_setCustomizations(){ - if [ "$arClassic3D" = 169 ]; then + if [ "$arClassic3D" == 169 ]; then DuckStation_wideScreenOn else DuckStation_wideScreenOff diff --git a/functions/EmuScripts/emuDeckFlycast.sh b/functions/EmuScripts/emuDeckFlycast.sh index b51e1f8f..1e959dcc 100644 --- a/functions/EmuScripts/emuDeckFlycast.sh +++ b/functions/EmuScripts/emuDeckFlycast.sh @@ -128,7 +128,7 @@ Flycast_finalize(){ } Flycast_IsInstalled(){ - if [ "$(flatpak --columns=app list | grep "$Flycast_emuPath")" = "$Flycast_emuPath" ]; then + if [ "$(flatpak --columns=app list | grep "$Flycast_emuPath")" == "$Flycast_emuPath" ]; then echo "true" else echo "false" diff --git a/functions/EmuScripts/emuDeckPCSX2QT.sh b/functions/EmuScripts/emuDeckPCSX2QT.sh index 705ea00f..8c1bbc7e 100644 --- a/functions/EmuScripts/emuDeckPCSX2QT.sh +++ b/functions/EmuScripts/emuDeckPCSX2QT.sh @@ -313,7 +313,7 @@ PCSX2QT_retroAchievementsSetLogin() { PCSX2QT_setRetroAchievements(){ PCSX2QT_retroAchievementsSetLogin - if [ "$achievementsHardcore" = "true" ]; then + if [ "$achievementsHardcore" == "true" ]; then PCSX2QT_retroAchievementsHardCoreOn else PCSX2QT_retroAchievementsHardCoreOff diff --git a/functions/EmuScripts/emuDeckRPCS3.sh b/functions/EmuScripts/emuDeckRPCS3.sh index 0104633f..b5634963 100644 --- a/functions/EmuScripts/emuDeckRPCS3.sh +++ b/functions/EmuScripts/emuDeckRPCS3.sh @@ -25,7 +25,7 @@ RPCS3_install(){ if safeDownload "$RPCS3_remuName" "$RPCS3_releaseURL" "$RPCS3_emuPath" "$showProgress"; then RPCS3_md5sum=($(md5sum $RPCS3_emuPath)) # get first element - if [ "$RPCS3_md5sum" = "$RPCS3_releaseMD5" ]; then + if [ "$RPCS3_md5sum" == "$RPCS3_releaseMD5" ]; then echo "RPCS3 PASSED HASH CHECK." chmod +x "$RPCS3_emuPath" else diff --git a/functions/EmuScripts/emuDeckRetroArch.sh b/functions/EmuScripts/emuDeckRetroArch.sh index f63de21d..a71fb710 100644 --- a/functions/EmuScripts/emuDeckRetroArch.sh +++ b/functions/EmuScripts/emuDeckRetroArch.sh @@ -87,7 +87,7 @@ RetroArch_setCustomizations(){ RetroArch_genesis_ar43 RetroArch_segacd_ar43 RetroArch_sega32x_ar43 - if [ "$RABezels" = true ] && [ "$doSetupRA" = "true" ]; then + if [ "$RABezels" == true ] && [ "$doSetupRA" == "true" ]; then RetroArch_mastersystem_bezelOn RetroArch_genesis_bezelOn RetroArch_segacd_bezelOn @@ -109,7 +109,7 @@ RetroArch_setCustomizations(){ *) RetroArch_snes_ar43 RetroArch_nes_ar43 - if [ "$RABezels" = true ] && [ "$doSetupRA" = "true" ]; then + if [ "$RABezels" == true ] && [ "$doSetupRA" == "true" ]; then RetroArch_snes_bezelOn fi ;; @@ -120,7 +120,7 @@ RetroArch_setCustomizations(){ #Nintendo 64 #Saturn #Xbox - if [ "$arClassic3D" = 169 ]; then + if [ "$arClassic3D" == 169 ]; then RetroArch_Beetle_PSX_HW_wideScreenOn RetroArch_Flycast_wideScreenOn RetroArch_dreamcast_bezelOff @@ -133,7 +133,7 @@ RetroArch_setCustomizations(){ RetroArch_Beetle_PSX_HW_wideScreenOff RetroArch_SwanStation_wideScreenOff #"Bezels on" - if [ "$RABezels" = true ]; then + if [ "$RABezels" == true ]; then RetroArch_dreamcast_bezelOn RetroArch_n64_bezelOn RetroArch_psx_bezelOn @@ -144,7 +144,7 @@ RetroArch_setCustomizations(){ RetroArch_setRetroAchievements(){ #RetroAchievments RetroArch_retroAchievementsSetLogin - if [ "$achievementsHardcore" = "true" ]; then + if [ "$achievementsHardcore" == "true" ]; then RetroArch_retroAchievementsHardCoreOn else RetroArch_retroAchievementsHardCoreOff @@ -252,7 +252,7 @@ RetroArch_setOverride(){ local fullPath="$RetroArch_coreConfigFolders/$coreName" local configFile="$fullPath/$fileName" - if [[ $value = 'ED_RM_LINE' ]]; then + if [[ $value == 'ED_RM_LINE' ]]; then echo "Deleting $option from $configFile" sed -i '/^'"$option"'/d' "$configFile" else @@ -266,7 +266,7 @@ RetroArch_setConfigOverride(){ local configFile=$3 local settingLine="$option = $value" - if [[ $value = 'ED_RM_LINE' ]]; then + if [[ $value == 'ED_RM_LINE' ]]; then echo "Deleting $option from $configFile" sed -i '/^'"$option"'/d' "$configFile" else @@ -2194,28 +2194,28 @@ RetroArch_retroAchievementsSetLogin(){ } RetroArch_setBezels(){ - if [ "$RABezels" = true ]; then + if [ "$RABezels" == true ]; then RetroArch_bezelOnAll else RetroArch_bezelOffAll fi } RetroArch_setShadersCRT(){ - if [ "$RAHandClassic2D" = true ]; then + if [ "$RAHandClassic2D" == true ]; then RetroArch_CRTshaderOnAll else RetroArch_CRTshaderOffAll fi } RetroArch_setShaders3DCRT(){ - if [ "$RAHandClassic3D" = true ]; then + if [ "$RAHandClassic3D" == true ]; then RetroArch_3DCRTshaderOnAll else RetroArch_3DCRTshaderOffAll fi } RetroArch_setShadersMAT(){ - if [ "$RAHandHeldShader" = true ]; then + if [ "$RAHandHeldShader" == true ]; then RetroArch_MATshadersOnAll else RetroArch_MATshadersOffAll @@ -2223,7 +2223,7 @@ RetroArch_setShadersMAT(){ } RetroArch_autoSave(){ - if [ "$RAautoSave" = true ]; then + if [ "$RAautoSave" == true ]; then RetroArch_autoSaveOn else RetroArch_autoSaveOff diff --git a/functions/EmuScripts/emuDeckXemu.sh b/functions/EmuScripts/emuDeckXemu.sh index 2f23b507..ba46fb96 100644 --- a/functions/EmuScripts/emuDeckXemu.sh +++ b/functions/EmuScripts/emuDeckXemu.sh @@ -149,7 +149,7 @@ Xemu_resetConfig(){ } Xemu_setCustomizations(){ - if [ "$arClassic3D" = 169 ]; then + if [ "$arClassic3D" == 169 ]; then Xemu_wideScreenOn else Xemu_wideScreenOff diff --git a/functions/EmuScripts/emuDeckXenia.sh b/functions/EmuScripts/emuDeckXenia.sh index ca8776ed..4e88f7df 100644 --- a/functions/EmuScripts/emuDeckXenia.sh +++ b/functions/EmuScripts/emuDeckXenia.sh @@ -18,7 +18,7 @@ Xenia_install(){ version=$1 local showProgress="$2" - if [[ "$version" = "master" ]]; then + if [[ "$version" == "master" ]]; then Xenia_releaseURL="$Xenia_releaseURL_master" else Xenia_releaseURL="$Xenia_releaseURL_canary" @@ -44,7 +44,7 @@ Xenia_install(){ sed -i "s|/run/media/mmcblk0p1/Emulation/roms|${romsPath}|" "${toolsPath}/launchers/xenia.sh" mkdir -p "$romsPath/xbox360/roms/xbla" -# if [[ "$launchLine" = *"PROTONLAUNCH"* ]]; then +# if [[ "$launchLine" == *"PROTONLAUNCH"* ]]; then # changeLine '"${PROTONLAUNCH}"' "$launchLine" "${toolsPath}/launchers/xenia.sh" # fi chmod +x "${toolsPath}/launchers/xenia.sh" @@ -66,7 +66,7 @@ Xenia_init(){ } Xenia_addESConfig(){ - if [[ $(grep -rnw "$es_systemsFile" -e 'xbox360') = "" ]]; then + if [[ $(grep -rnw "$es_systemsFile" -e 'xbox360') == "" ]]; then xmlstarlet ed -S --inplace --subnode '/systemList' --type elem --name 'system' \ --var newSystem '$prev' \ --subnode '$newSystem' --type elem --name 'name' -v 'xbox360' \ diff --git a/functions/RemotePlayClientScripts/remotePlayChiaki.sh b/functions/RemotePlayClientScripts/remotePlayChiaki.sh index d6e51d01..4ebc4688 100644 --- a/functions/RemotePlayClientScripts/remotePlayChiaki.sh +++ b/functions/RemotePlayClientScripts/remotePlayChiaki.sh @@ -47,10 +47,10 @@ Chiaki_uninstall() { # Check if installed Chiaki_IsInstalled() { - if [ "$(flatpak --columns=app list | grep "$Chiaki_emuPath")" = "$Chiaki_emuPath" ]; then + if [ "$(flatpak --columns=app list | grep "$Chiaki_emuPath")" == "$Chiaki_emuPath" ]; then # Uninstall if previously installed to the "system" level flatpak list | grep "$Chiaki_emuPath" | grep "system" - if [ $? = 0 ]; then + if [ $? == 0 ]; then Chiaki_uninstall Chiaki_install fi diff --git a/functions/RemotePlayClientScripts/remotePlayMoonlight.sh b/functions/RemotePlayClientScripts/remotePlayMoonlight.sh index c4beb890..8241a137 100644 --- a/functions/RemotePlayClientScripts/remotePlayMoonlight.sh +++ b/functions/RemotePlayClientScripts/remotePlayMoonlight.sh @@ -47,10 +47,10 @@ Moonlight_uninstall() { # Check if installed Moonlight_IsInstalled() { - if [ "$(flatpak --columns=app list | grep "$Moonlight_emuPath")" = "$Moonlight_emuPath" ]; then + if [ "$(flatpak --columns=app list | grep "$Moonlight_emuPath")" == "$Moonlight_emuPath" ]; then # Uninstall if previously installed to the "system" level flatpak list | grep "$Moonlight_emuPath" | grep "system" - if [ $? = 0 ]; then + if [ $? == 0 ]; then Moonlight_uninstall Moonlight_install fi diff --git a/functions/RemotePlayClientScripts/remotePlayParsec.sh b/functions/RemotePlayClientScripts/remotePlayParsec.sh index 448125ad..1fe47e99 100644 --- a/functions/RemotePlayClientScripts/remotePlayParsec.sh +++ b/functions/RemotePlayClientScripts/remotePlayParsec.sh @@ -47,10 +47,10 @@ Parsec_uninstall() { # Check if installed Parsec_IsInstalled() { - if [ "$(flatpak --columns=app list | grep "$Parsec_emuPath")" = "$Parsec_emuPath" ]; then + if [ "$(flatpak --columns=app list | grep "$Parsec_emuPath")" == "$Parsec_emuPath" ]; then # Uninstall if previously installed to the "system" level flatpak list | grep "$Parsec_emuPath" | grep "system" - if [ $? = 0 ]; then + if [ $? == 0 ]; then Parsec_uninstall Parsec_install fi diff --git a/functions/ToolScripts/emuDeckCloudBackup.sh b/functions/ToolScripts/emuDeckCloudBackup.sh index ec105ebf..c41bcf6c 100644 --- a/functions/ToolScripts/emuDeckCloudBackup.sh +++ b/functions/ToolScripts/emuDeckCloudBackup.sh @@ -86,7 +86,7 @@ cloud_backup_providersSetup(){ xdg-settings set default-web-browser com.google.Chrome.desktop fi - if [ $rclone_provider = "Emudeck-NextCloud" ]; then + if [ $rclone_provider == "Emudeck-NextCloud" ]; then local url local username @@ -111,7 +111,7 @@ cloud_backup_providersSetup(){ else echo "Cancel Nextcloud Login" fi - elif [ $rclone_provider = "Emudeck-SFTP" ]; then + elif [ $rclone_provider == "Emudeck-SFTP" ]; then NCInput=$(zenity --forms \ --title="SFTP Sign in" \ @@ -135,7 +135,7 @@ cloud_backup_providersSetup(){ echo "Cancel SFTP Login" fi - elif [ $cloud_sync_provider = "Emudeck-SMB" ]; then + elif [ $cloud_sync_provider == "Emudeck-SMB" ]; then NCInput=$(zenity --forms \ --title="SMB Sign in" \ @@ -192,15 +192,15 @@ cloud_backup_etup(){ --ok-label Exit 2>/dev/null ) fi rc=$? - if [ "$rc" = 0 ] || [ "$ans" = "" ]; then + if [ "$rc" == 0 ] || [ "$ans" == "" ]; then break - elif [ "$ans" = "Install cloud_backup" ] || [ "$ans" = "Reinstall cloud_backup" ]; then + elif [ "$ans" == "Install cloud_backup" ] || [ "$ans" == "Reinstall cloud_backup" ]; then rclone_install - elif [ "$ans" = "Pick Provider" ]; then + elif [ "$ans" == "Pick Provider" ]; then rclone_pickProvider - elif [ "$ans" = "Login to your cloud provider" ]; then + elif [ "$ans" == "Login to your cloud provider" ]; then rclone_updateProvider - elif [ "$ans" = "Create Backup" ]; then + elif [ "$ans" == "Create Backup" ]; then rclone_createBackup fi done @@ -365,17 +365,17 @@ cloud_backup_createBackup(){ --extra-button "Run Backup Once" \ --ok-label Exit 2>/dev/null ) rc=$? - if [ "$rc" = 0 ] || [ "$ans" = "" ]; then + if [ "$rc" == 0 ] || [ "$ans" == "" ]; then echo "nothing chosen" - elif [ "$ans" = "Create Service" ]; then + elif [ "$ans" == "Create Service" ]; then cloud_backup_createService - elif [ "$ans" = "Start Service" ]; then + elif [ "$ans" == "Start Service" ]; then cloud_backup_startService - elif [ "$ans" = "Stop Service" ]; then + elif [ "$ans" == "Stop Service" ]; then cloud_backup_stopService - elif [ "$ans" = "Restore Cloud Files" ]; then + elif [ "$ans" == "Restore Cloud Files" ]; then cloud_backup_downloadFiles - elif [ "$ans" = "Run Backup Once" ]; then + elif [ "$ans" == "Run Backup Once" ]; then cloud_backup_runJobOnce fi } \ No newline at end of file diff --git a/functions/ToolScripts/emuDeckCloudSync.sh b/functions/ToolScripts/emuDeckCloudSync.sh index 58342280..19ba4a7b 100644 --- a/functions/ToolScripts/emuDeckCloudSync.sh +++ b/functions/ToolScripts/emuDeckCloudSync.sh @@ -75,7 +75,7 @@ createCloudFile() { cloud_sync_setup_providers(){ startLog ${FUNCNAME[0]} - if [ "$cloud_sync_provider" = "Emudeck-NextCloud" ]; then + if [ "$cloud_sync_provider" == "Emudeck-NextCloud" ]; then local url local username @@ -100,7 +100,7 @@ cloud_sync_setup_providers(){ else echo "Cancel Nextcloud Login" fi - elif [ "$cloud_sync_provider" = "Emudeck-SFTP" ]; then + elif [ "$cloud_sync_provider" == "Emudeck-SFTP" ]; then NCInput=$(zenity --forms \ --title="SFTP Sign in" \ @@ -124,11 +124,11 @@ cloud_sync_setup_providers(){ else echo "Cancel SFTP Login" fi - elif [ "$cloud_sync_provider" = "Emudeck-OneDrive" ]; then + elif [ "$cloud_sync_provider" == "Emudeck-OneDrive" ]; then find "$savesPath" -type d -exec bash -c 'createCloudFile "$0"' {} \; "$cloud_sync_bin" config update "$cloud_sync_provider" && "$cloud_sync_bin" mkdir "$cloud_sync_provider:Emudeck\saves" && "$cloud_sync_bin" copy "$savesPath" "$cloud_sync_provider:Emudeck\saves" --include "*.cloud" echo "true" find "$savesPath" -type f -name "*.cloud" -exec rm {} \; - elif [ "$cloud_sync_provider" = "Emudeck-SMB" ]; then + elif [ "$cloud_sync_provider" == "Emudeck-SMB" ]; then NCInput=$(zenity --forms \ --title="SMB Sign in" \ @@ -162,10 +162,10 @@ cloud_sync_setup_providers(){ startLog ${FUNCNAME[0]} while read line do - if [[ "$line" = *"[Emudeck"* ]] + if [[ "$line" == *"[Emudeck"* ]] then section=$line - elif [[ "$line" = *"token = "* ]]; then + elif [[ "$line" == *"token == "* ]]; then token=$line break fi @@ -175,7 +175,7 @@ cloud_sync_setup_providers(){ replace_with="" # Cleanup - token=${token/"token = "/$replace_with} + token=${token/"token == "/$replace_with} token=$(echo "$token" | sed "s/\"/'/g") section=$(echo "$section" | sed 's/[][]//g; s/"//g') @@ -268,7 +268,7 @@ cloud_sync_upload(){ local emuName=$1 local timestamp=$(date +%s) - if [ "$cloud_sync_status" = "true" ]; then + if [ "$cloud_sync_status" == "true" ]; then cloud_sync_lock if [ "$emuName" = "all" ]; then @@ -297,11 +297,11 @@ cloud_sync_download(){ startLog ${FUNCNAME[0]} local emuName=$1 local timestamp=$(date +%s) - if [ "$cloud_sync_status" = "true" ]; then + if [ "$cloud_sync_status" == "true" ]; then #We wait for any upload in progress in the background cloud_sync_check_lock - if [ "$emuName" = "all" ]; then + if [ "$emuName" == "all" ]; then #We check the hashes cloud_sync_save_hash "$savesPath/$emuName" local filePath="$savesPath/.hash" @@ -365,7 +365,7 @@ cloud_sync_uploadEmu(){ local emuName=$1 local mode=$2 local time_stamp - if [ -f "$cloud_sync_bin" ] && [ "$cloud_sync_status" = "true" ]; then + if [ -f "$cloud_sync_bin" ] && [ "$cloud_sync_status" == "true" ]; then if [[ $cloud_sync_provider != *"Emudeck"* ]]; then text="$(printf "CloudSync is not properly configured, please configure it again from EmuDeck")" @@ -373,7 +373,7 @@ cloud_sync_uploadEmu(){ return 0 fi #We check for internet connection - if [ $(check_internet_connection) = "true" ]; then + if [ $(check_internet_connection) == "true" ]; then #Do we have a failed upload? if [ -f $savesPath/$emuName/.fail_upload ]; then @@ -438,7 +438,7 @@ cloud_sync_downloadEmu(){ if [ -f "$cloud_sync_bin" ]; then local timestamp=$(date +%s) - if [ -f "$cloud_sync_bin" ] && [ "$cloud_sync_status" = "true" ]; then + if [ -f "$cloud_sync_bin" ] && [ "$cloud_sync_status" == "true" ]; then if [[ $cloud_sync_provider != *"Emudeck"* ]]; then text="$(printf "CloudSync is not properly configured, please configure it again from EmuDeck")" @@ -447,7 +447,7 @@ cloud_sync_downloadEmu(){ fi #We check for internet connection - if [ $(check_internet_connection) = "true" ]; then + if [ $(check_internet_connection) == "true" ]; then #Do we have a pending upload? if [ -f $savesPath/$emuName/.pending_upload ]; then @@ -621,7 +621,7 @@ cloud_sync_check_lock(){ cloud_decky_check_status(){ startLog ${FUNCNAME[0]} - if [ $(check_internet_connection) = "true" ]; then + if [ $(check_internet_connection) == "true" ]; then if [ $cloud_sync_status = "true" ]; then if [ -f "$savesPath/.gaming" ] && [ ! -f "$HOME/emudeck/cloud.lock" ]; then echo "started" diff --git a/functions/ToolScripts/emuDeckESDE.sh b/functions/ToolScripts/emuDeckESDE.sh index ce15ce8a..5ebdc5b9 100644 --- a/functions/ToolScripts/emuDeckESDE.sh +++ b/functions/ToolScripts/emuDeckESDE.sh @@ -16,10 +16,10 @@ es_settingsFile="$HOME/.emulationstation/es_settings.xml" ESDE_SetAppImageURLS() { local json="$(curl -s $ESDE_releaseJSON)" - ESDE_releaseURL=$(echo "$json" | jq -r '.stable.packages[] | select(.name = "LinuxSteamDeckAppImage") | .url') - ESDE_releaseMD5=$(echo "$json" | jq -r '.stable.packages[] | select(.name = "LinuxSteamDeckAppImage") | .md5') - ESDE_prereleaseURL=$(echo "$json" | jq -r '.prerelease.packages[] | select(.name = "LinuxSteamDeckAppImage") | .url') - ESDE_prereleaseMD5=$(echo "$json" | jq -r '.prerelease.packages[] | select(.name = "LinuxSteamDeckAppImage") | .md5') + ESDE_releaseURL=$(echo "$json" | jq -r '.stable.packages[] | select(.name == "LinuxSteamDeckAppImage") | .url') + ESDE_releaseMD5=$(echo "$json" | jq -r '.stable.packages[] | select(.name == "LinuxSteamDeckAppImage") | .md5') + ESDE_prereleaseURL=$(echo "$json" | jq -r '.prerelease.packages[] | select(.name == "LinuxSteamDeckAppImage") | .url') + ESDE_prereleaseMD5=$(echo "$json" | jq -r '.prerelease.packages[] | select(.name == "LinuxSteamDeckAppImage") | .md5') } #cleanupOlderThings @@ -82,7 +82,7 @@ ESDE_install(){ # # if safeDownload "$ESDE_toolName" "$ESDE_prereleaseURL" "$ESDE_toolPath" "$showProgress"; then # ESDE_md5sum=($(md5sum $ESDE_toolPath)) # get first element -# if [ "$ESDE_md5sum" = "$ESDE_prereleaseMD5" ]; then +# if [ "$ESDE_md5sum" == "$ESDE_prereleaseMD5" ]; then # echo "ESDE PASSED HASH CHECK." # chmod +x "$ESDE_toolPath" # else @@ -122,7 +122,7 @@ ESDE_init(){ ESDE_finalize ESDE_migrateEpicNoir - if [ "$system" = "chimeraos" ] || [ "$system" = "ChimeraOS" ]; then + if [ "$system" == "chimeraos" ] || [ "$system" == "ChimeraOS" ]; then ESDE_chimeraOS fi @@ -166,7 +166,7 @@ ESDE_update(){ ESDE_addCustomSystems(){ #insert cemu custom system if it doesn't exist, but the file does - if [[ $(grep -rnw "$es_systemsFile" -e 'wiiu') = "" ]]; then + if [[ $(grep -rnw "$es_systemsFile" -e 'wiiu') == "" ]]; then xmlstarlet ed -S --inplace --subnode '/systemList' --type elem --name 'system' \ --var newSystem '$prev' \ --subnode '$newSystem' --type elem --name 'name' -v 'wiiu' \ @@ -212,8 +212,8 @@ ESDE_setEmulationFolder(){ echo "updating $es_systemsFile" #insert new commands - if [[ ! $(grep -rnw "$es_systemsFile" -e 'wiiu') = "" ]]; then - if [[ $(grep -rnw "$es_systemsFile" -e 'Cemu (Proton)') = "" ]]; then + if [[ ! $(grep -rnw "$es_systemsFile" -e 'wiiu') == "" ]]; then + if [[ $(grep -rnw "$es_systemsFile" -e 'Cemu (Proton)') == "" ]]; then #insert xmlstarlet ed -S --inplace --subnode 'systemList/system[name="wiiu"]' --type elem --name 'commandP' -v "/usr/bin/bash ${toolsPath}/launchers/cemu.sh -w -f -g z:%ROM%" \ --insert 'systemList/system/commandP' --type attr --name 'label' --value "Cemu (Proton)" \ @@ -227,7 +227,7 @@ ESDE_setEmulationFolder(){ cemuProtonCommandString="/usr/bin/bash ${toolsPath}/launchers/cemu.sh -w -f -g z:%ROM%" xmlstarlet ed -L -u '/systemList/system/command[@label="Cemu (Proton)"]' -v "$cemuProtonCommandString" "$es_systemsFile" fi - if [[ $(grep -rnw "$es_systemsFile" -e 'Cemu (Native)') = "" ]]; then + if [[ $(grep -rnw "$es_systemsFile" -e 'Cemu (Native)') == "" ]]; then #insert xmlstarlet ed -S --inplace --subnode 'systemList/system[name="wiiu"]' --type elem --name 'commandN' -v "/usr/bin/bash ${toolsPath}/launchers/cemu.sh -f -g %ROM%" \ --insert 'systemList/system/commandN' --type attr --name 'label' --value "Cemu (Native)" \ @@ -242,8 +242,8 @@ ESDE_setEmulationFolder(){ xmlstarlet ed -L -u '/systemList/system/command[@label="Cemu (Native)"]' -v "$cemuNativeCommandString" "$es_systemsFile" fi fi - if [[ ! $(grep -rnw "$es_systemsFile" -e 'xbox360') = "" ]]; then - if [[ $(grep -rnw "$es_systemsFile" -e 'Xenia (Proton)') = "" ]]; then + if [[ ! $(grep -rnw "$es_systemsFile" -e 'xbox360') == "" ]]; then + if [[ $(grep -rnw "$es_systemsFile" -e 'Xenia (Proton)') == "" ]]; then #insert xmlstarlet ed -S --inplace --subnode 'systemList/system[name="xbox360"]' --type elem --name 'commandP' -v "/usr/bin/bash ${toolsPath}/launchers/xenia.sh %ROM%" \ --insert 'systemList/system/commandP' --type attr --name 'label' --value "Xenia (Proton)" \ @@ -271,7 +271,7 @@ ESDE_setEmulationFolder(){ mediaDirFound=$(grep -rnw "$es_settingsFile" -e 'MediaDirectory') mediaDirEmpty=$(grep -rnw "$es_settingsFile" -e '') mediaDirEmulation=$(grep -rnw "$es_settingsFile" -e 'Emulation/tools/downloaded_media') - if [[ $mediaDirFound = '' ]]; then + if [[ $mediaDirFound == '' ]]; then echo "adding ES-DE ${esDE_MediaDir}" sed -i -e '$a'"${esDE_MediaDir}" "$es_settingsFile" # use config file instead of link elif [[ -z $mediaDirEmpty || -n $mediaDirEmulation ]]; then @@ -334,11 +334,11 @@ ESDE_setEmu(){ mkdir -p "$HOME/.emulationstation/gamelists/$system" && cp "$EMUDECKGIT/configs/emulationstation/gamelists/$system/gamelist.xml" "$gamelistFile" else gamelistFound=$(grep -rnw "$gamelistFile" -e 'gameList') - if [[ $gamelistFound = '' ]]; then + if [[ $gamelistFound == '' ]]; then sed -i -e '$a\' "$gamelistFile" fi alternativeEmu=$(grep -rnw "$gamelistFile" -e 'alternativeEmulator') - if [[ $alternativeEmu = '' ]]; then + if [[ $alternativeEmu == '' ]]; then echo "" >> "$gamelistFile" fi sed -i "s|||g" "$gamelistFile" diff --git a/functions/ToolScripts/emuDeckMigration.sh b/functions/ToolScripts/emuDeckMigration.sh index f6473f45..1b0e7e16 100644 --- a/functions/ToolScripts/emuDeckMigration.sh +++ b/functions/ToolScripts/emuDeckMigration.sh @@ -159,7 +159,7 @@ Migration_fix_SDPaths(){ text="$(printf "Only use this if you have your roms on your SDCard and SteamOS 3.5 has been released and your Steam shortcuts no longer work.\n\nYour old path was:\n${oldPath}\n\nYour new path is:\n${newPath}/\n\nDo you want me to change it?")" zenity --question --title="Confirm path fix" --width 400 --text="${text}" --ok-label="Yes" --cancel-label="No" 2>/dev/null - if [[ $? = 0 ]]; then + if [[ $? == 0 ]]; then kill -15 $(pidof steam) Migration_updateSRM "$oldPath" "$newPath/" && Migration_updatePaths "$oldPath/Emulation" "$newPath/Emulation" && Migration_updateParsers "$oldPath" "$newPath/" && Migration_ESDE && echo "true" diff --git a/functions/ToolScripts/emuDeckPlugins.sh b/functions/ToolScripts/emuDeckPlugins.sh index 07a1d443..7edbbff6 100644 --- a/functions/ToolScripts/emuDeckPlugins.sh +++ b/functions/ToolScripts/emuDeckPlugins.sh @@ -19,7 +19,7 @@ Plugins_checkPassword(){ if [ "$password" = "Decky!" ]; then #We create the password yes "$password" | passwd $(whoami) - elif [ "$system" = "chimeraos" ]; then + elif [ "$system" == "chimeraos" ]; then password="gamer" else if ( echo "$PASS" | sudo -S -k true ); then diff --git a/functions/ToolScripts/emuDeckSRM.sh b/functions/ToolScripts/emuDeckSRM.sh index 193c21f6..5b857199 100644 --- a/functions/ToolScripts/emuDeckSRM.sh +++ b/functions/ToolScripts/emuDeckSRM.sh @@ -247,65 +247,65 @@ SRM_createParsers(){ exclusionList=$exclusionList"nintendo_gb-mGBA.json\n" #Exclusion based on install status. - if [ $doInstallPrimeHack = "false" ] || [ $(Primehack_IsInstalled) = "false" ]; then + if [ $doInstallPrimeHack == "false" ] || [ $(Primehack_IsInstalled) == "false" ]; then exclusionList=$exclusionList"nintendo_primehack.json\n" fi - if [ $doInstallRPCS3 = "false" ] || [ $(RPCS3_IsInstalled) = "false" ]; then + if [ $doInstallRPCS3 == "false" ] || [ $(RPCS3_IsInstalled) == "false" ]; then exclusionList=$exclusionList"sony_ps3-rpcs3-extracted_iso_psn.json\n" exclusionList=$exclusionList"sony_ps3-rpcs3-pkg.json\n" fi - if [ $doInstallCitra = "false" ] || [ $(Citra_IsInstalled) = "false" ]; then + if [ $doInstallCitra == "false" ] || [ $(Citra_IsInstalled) == "false" ]; then exclusionList=$exclusionList"nintendo_3ds-citra.json\n" fi - if [ $doInstallDolphin = "false" ] || [ $(Dolphin_IsInstalled) = "false" ]; then + if [ $doInstallDolphin == "false" ] || [ $(Dolphin_IsInstalled) == "false" ]; then exclusionList=$exclusionList"nintendo_gc-dolphin.json\n" exclusionList=$exclusionList"nintendo_wii-dolphin.json\n" fi - if [ $doInstallDuck = "false" ] || [ $(DuckStation_IsInstalled) = "false" ]; then + if [ $doInstallDuck == "false" ] || [ $(DuckStation_IsInstalled) == "false" ]; then exclusionList=$exclusionList"sony_psx-duckstation.json\n" fi - if [ $doInstallPPSSPP = "false" ] || [ $(PPSSPP_IsInstalled) = "false" ]; then + if [ $doInstallPPSSPP == "false" ] || [ $(PPSSPP_IsInstalled) == "false" ]; then exclusionList=$exclusionList"sony_psp-ppsspp.json\n" fi - if [ $doInstallXemu = "false" ] || [ $(Xemu_IsInstalled) = "false" ]; then + if [ $doInstallXemu == "false" ] || [ $(Xemu_IsInstalled) == "false" ]; then exclusionList=$exclusionList"microsoft_xbox-xemu.json\n" fi - if [ $doInstallXenia = "false" ] || [ $(Xenia_IsInstalled) = "false" ]; then + if [ $doInstallXenia == "false" ] || [ $(Xenia_IsInstalled) == "false" ]; then exclusionList=$exclusionList"microsoft_xbox_360-xenia-xbla.json\n" exclusionList=$exclusionList"microsoft_xbox_360-xenia.json\n" fi - if [ $doInstallScummVM = "false" ] || [ $(ScummVM_IsInstalled) = "false" ]; then + if [ $doInstallScummVM == "false" ] || [ $(ScummVM_IsInstalled) == "false" ]; then exclusionList=$exclusionList"scumm_scummvm.json\n" fi - if [ $doInstallRMG = "false" ] || [ $(RMG_IsInstalled) = "false" ]; then + if [ $doInstallRMG == "false" ] || [ $(RMG_IsInstalled) == "false" ]; then exclusionList=$exclusionList"nintendo_64-rmg.json\n" fi - if [ $doInstallmelonDS = "false" ] || [ $(melonDS_IsInstalled) = "false" ]; then + if [ $doInstallmelonDS == "false" ] || [ $(melonDS_IsInstalled) == "false" ]; then exclusionList=$exclusionList"nintendo_ds-melonds.json\n" fi - if [ $doInstallVita3K = "false" ] || [ $(Vita3K_IsInstalled) = "false" ]; then + if [ $doInstallVita3K == "false" ] || [ $(Vita3K_IsInstalled) == "false" ]; then exclusionList=$exclusionList"sony_psvita-vita3k-pkg.json\n" fi - if [ $doInstallMGBA = "false" ] || [ $(mGBA_IsInstalled) = "false" ]; then + if [ $doInstallMGBA == "false" ] || [ $(mGBA_IsInstalled) == "false" ]; then exclusionList=$exclusionList"nintendo_gb-mGBA.json\n" exclusionList=$exclusionList"nintendo_gba-mgba.json\n" exclusionList=$exclusionList"nintendo_gbc-mgba.json\n" fi - if [ $doInstallMAME = "false" ] || [ $(MAME_IsInstalled) = "false" ]; then + if [ $doInstallMAME == "false" ] || [ $(MAME_IsInstalled) == "false" ]; then exclusionList=$exclusionList"arcade-mame.json\n" fi - if [ $doInstallYuzu = "false" ] || [ $(Yuzu_IsInstalled) = "false" ]; then + if [ $doInstallYuzu == "false" ] || [ $(Yuzu_IsInstalled) == "false" ]; then exclusionList=$exclusionList"nintendo_switch-yuzu.json\n" fi - if [ $doInstallRyujinx = "false" ] || [ $(Ryujinx_IsInstalled) = "false" ]; then + if [ $doInstallRyujinx == "false" ] || [ $(Ryujinx_IsInstalled) == "false" ]; then exclusionList=$exclusionList"nintendo_switch-ryujinx.json\n" fi - if [ "$doInstallPCSX2QT" = "false" ] || [ $(PCSX2QT_IsInstalled) = "false" ]; then + if [ "$doInstallPCSX2QT" == "false" ] || [ $(PCSX2QT_IsInstalled) == "false" ]; then exclusionList=$exclusionList"sony_ps2-pcsx2.json\n" fi diff --git a/functions/ToolScripts/emuDecky.sh b/functions/ToolScripts/emuDecky.sh index 3afe2313..5ceba52e 100644 --- a/functions/ToolScripts/emuDecky.sh +++ b/functions/ToolScripts/emuDecky.sh @@ -1,7 +1,7 @@ #!/bin/bash Decky_autoSave(){ - if [ "$RABezels" = true ]; then + if [ "$RABezels" == true ]; then RetroArch_bezelOnAll else RetroArch_bezelOffAll @@ -9,7 +9,7 @@ Decky_autoSave(){ } Decky_bezels(){ - if [ "$RABezels" = true ]; then + if [ "$RABezels" == true ]; then RetroArch_bezelOnAll else RetroArch_bezelOffAll @@ -17,7 +17,7 @@ Decky_bezels(){ } Decky_shaders_LCD(){ - if [ "$RAHandHeldShader" = true ]; then + if [ "$RAHandHeldShader" == true ]; then RetroArch_MATshadersOnAll else RetroArch_MATshadersOffAll @@ -25,7 +25,7 @@ Decky_shaders_LCD(){ } Decky_shaders_2D(){ - if [ "$RAHandClassic2D" = true ]; then + if [ "$RAHandClassic2D" == true ]; then RetroArch_CRTshaderOnAll else RetroArch_CRTshaderOffAll @@ -33,7 +33,7 @@ Decky_shaders_2D(){ } Decky_shaders_3D(){ - if [ "$RAHandClassic3D" = true ]; then + if [ "$RAHandClassic3D" == true ]; then RetroArch_3DCRTshaderOnAll else RetroArch_3DCRTshaderOffAll @@ -41,7 +41,7 @@ Decky_shaders_3D(){ } Decky_ar_snes(){ - if [ "$arSnes" = 87 ]; then + if [ "$arSnes" == 87 ]; then RetroArch_snes_ar87 RetroArch_nes_ar87 else @@ -60,7 +60,7 @@ Decky_setAR(){ } Decky_setClourd(){ - if [ $cloud_sync_status = "false" ]; then + if [ $cloud_sync_status == "false" ]; then setSetting cloud_sync_status "true" > /dev/null else setSetting cloud_sync_status "false" > /dev/null diff --git a/functions/all.sh b/functions/all.sh index 633dcb54..c353834e 100644 --- a/functions/all.sh +++ b/functions/all.sh @@ -4,7 +4,7 @@ if [ appleChip != "Linux" ]; then PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH" fi -if [[ "$EMUDECKGIT" = "" ]]; then +if [[ "$EMUDECKGIT" == "" ]]; then EMUDECKGIT="$HOME/.config/EmuDeck/backend" fi diff --git a/functions/appImageInit.sh b/functions/appImageInit.sh index 9e3e05a5..15c8af63 100644 --- a/functions/appImageInit.sh +++ b/functions/appImageInit.sh @@ -1,7 +1,7 @@ #!/bin/bash appImageInit() { - if [ "$system" = "chimeraos" ]; then + if [ "$system" == "chimeraos" ]; then ESDE_chimeraOS mkdir -p $HOME/Applications diff --git a/functions/checkBIOS.sh b/functions/checkBIOS.sh index a1cf0a2a..259d5c07 100644 --- a/functions/checkBIOS.sh +++ b/functions/checkBIOS.sh @@ -12,7 +12,7 @@ checkPS1BIOS(){ PSBios=(239665b1a3dade1b5a52c06338011044 2118230527a9f51bd9216e32fa912842 849515939161e62f6b866f6853006780 dc2b9bf8da62ec93e868cfd29f0d067d 54847e693405ffeb0359c6287434cbef cba733ceeff5aef5c32254f1d617fa62 da27e8b6dab242d8f91a9b25d80c63b8 417b34706319da7cf001e76e40136c23 57a06303dfa9cf9351222dfcbb4a29d9 81328b966e6dcf7ea1e32e55e1c104bb 924e392ed05558ffdb115408c263dccf e2110b8a2b97a8e0b857a45d32f7e187 ca5cfc321f916756e3f0effbfaeba13b 8dd7d5296a650fac7319bce665a6a53c 490f666e1afb15b7362b406ed1cea246 32736f17079d0b2b7024407c39bd3050 8e4c14f567745eff2f0408c8129f72a6 b84be139db3ee6cbd075630aa20a6553 1e68c231d0896b7eadcad1d7d8e76129 b9d9a0286c33dc6b7237bb13cd46fdee 8abc1b549a4a80954addc48ef02c4521 9a09ab7e49b422c007e6d54d7c49b965 b10f5e0e3d9eb60e5159690680b1e774 6e3735ff4c7dc899ee98981385f6f3d0 de93caec13d1a141a40a79f5c86168d6 c53ca5908936d412331790f4426c6c33 476d68a94ccec3b9c8303bbd1daf2810 d8f485717a5237285e4d7c5f881b7f32 fbb5f59ec332451debccf1e377017237 81bbe60ba7a3d1cea1d48c14cbcc647b) for i in "${PSBios[@]}" do - if [[ "$md5" = *"${i}"* ]]; then + if [[ "$md5" == *"${i}"* ]]; then PSXBIOS=true #mv "$entry" "${entry,,}" break @@ -25,7 +25,7 @@ checkPS1BIOS(){ done - if [ $PSXBIOS = true ]; then + if [ $PSXBIOS == true ]; then echo "$entry true"; else echo "false"; @@ -45,7 +45,7 @@ checkPS2BIOS(){ PS2Bios=(32f2e4d5ff5ee11072a6bc45530f5765 acf4730ceb38ac9d8c7d8e21f2614600 acf9968c8f596d2b15f42272082513d1 b1459d7446c69e3e97e6ace3ae23dd1c d3f1853a16c2ec18f3cd1ae655213308 63e6fd9b3c72e0d7b920e80cf76645cd a20c97c02210f16678ca3010127caf36 8db2fbbac7413bf3e7154c1e0715e565 91c87cb2f2eb6ce529a2360f80ce2457 3016b3dd42148a67e2c048595ca4d7ce b7fa11e87d51752a98b38e3e691cbf17 f63bc530bd7ad7c026fcd6f7bd0d9525 cee06bd68c333fc5768244eae77e4495 0bf988e9c7aaa4c051805b0fa6eb3387 8accc3c49ac45f5ae2c5db0adc854633 6f9a6feb749f0533aaae2cc45090b0ed 838544f12de9b0abc90811279ee223c8 bb6bbc850458fff08af30e969ffd0175 815ac991d8bc3b364696bead3457de7d b107b5710042abe887c0f6175f6e94bb ab55cceea548303c22c72570cfd4dd71 18bcaadb9ff74ed3add26cdf709fff2e 491209dd815ceee9de02dbbc408c06d6 7200a03d51cacc4c14fcdfdbc4898431 8359638e857c8bc18c3c18ac17d9cc3c 352d2ff9b3f68be7e6fa7e6dd8389346 d5ce2c7d119f563ce04bc04dbc3a323e 0d2228e6fd4fb639c9c39d077a9ec10c 72da56fccb8fcd77bba16d1b6f479914 5b1f47fbeb277c6be2fccdd6344ff2fd 315a4003535dfda689752cb25f24785c 312ad4816c232a9606e56f946bc0678a 666018ffec65c5c7e04796081295c6c7 6e69920fa6eef8522a1d688a11e41bc6 eb960de68f0c0f7f9fa083e9f79d0360 8aa12ce243210128c5074552d3b86251 240d4c5ddd4b54069bdc4a3cd2faf99d 1c6cd089e6c83da618fbf2a081eb4888 463d87789c555a4a7604e97d7db545d1 35461cecaa51712b300b2d6798825048 bd6415094e1ce9e05daabe85de807666 2e70ad008d4ec8549aada8002fdf42fb b53d51edc7fc086685e31b811dc32aad 1b6e631b536247756287b916f9396872 00da1b177096cfd2532c8fa22b43e667 afde410bd026c16be605a1ae4bd651fd 81f4336c1de607dd0865011c0447052e 0eee5d1c779aa50e94edd168b4ebf42e d333558cc14561c1fdc334c75d5f37b7 dc752f160044f2ed5fc1f4964db2a095 63ead1d74893bf7f36880af81f68a82d 3e3e030c0f600442fa05b94f87a1e238 1ad977bb539fc9448a08ab276a836bbc eb4f40fcf4911ede39c1bbfe91e7a89a 9959ad7a8685cad66206e7752ca23f8b 929a14baca1776b00869f983aa6e14d2 573f7d4a430c32b3cc0fd0c41e104bbd df63a604e8bff5b0599bd1a6c2721bd0 5b1ba4bb914406fae75ab8e38901684d cb801b7920a7d536ba07b6534d2433ca af60e6d1a939019d55e5b330d24b1c25 549a66d0c698635ca9fa3ab012da7129 5de9d0d730ff1e7ad122806335332524 21fe4cad111f7dc0f9af29477057f88d 40c11c063b3b9409aa5e4058e984e30c 80bbb237a6af9c611df43b16b930b683 c37bce95d32b2be480f87dd32704e664 80ac46fa7e77b8ab4366e86948e54f83 21038400dc633070a78ad53090c53017 dc69f0643a3030aaa4797501b483d6c4 30d56e79d89fbddf10938fa67fe3f34e 93ea3bcee4252627919175ff1b16a1d9 d3e81e95db25f5a86a7b7474550a2155) for i in "${PS2Bios[@]}" do - if [[ "$md5" = *"${i}"* ]]; then + if [[ "$md5" == *"${i}"* ]]; then PS2BIOS=true #mv "$entry" "${entry,,}" break @@ -58,7 +58,7 @@ checkPS2BIOS(){ done - if [ $PS2BIOS = true ]; then + if [ $PS2BIOS == true ]; then echo "true"; else echo "false"; @@ -87,7 +87,7 @@ checkSegaCDBios(){ CDBios=(bc6ae4e1db01a2f349d9af392bf7e2bd 29ad9ce848b49d0f9cefc294137f653c cc049159d7e744c15eee080c241273b4 278a9397d192149e84e820ac621a8edd a3ddcc8483b0368141adfd99d9a1e466 bdeb4c47da613946d422d97d98b21cda 96ea588d647f2ab1f291279fc691663c 2efd74e3232ff260e371b99f84024f7f e66fa1dc5820d254611fdcdba0662372 683a8a9e273662561172468dfa2858eb 310a9081d2edf2d316ab38813136725e 9b562ebf2d095bf1dabadbc1881f519a 854b9150240a198070150e4566ae1290 b10c0a97abc57b758497d3fae6ab35a4 ecc837c31d77b774c6e27e38f828aa9a baca1df271d7c11fe50087c0358f4eb5) for i in "${CDBios[@]}" do - if [[ "$md5" = *"${i}"* ]]; then + if [[ "$md5" == *"${i}"* ]]; then SEGACDBIOS=true break else @@ -99,7 +99,7 @@ checkSegaCDBios(){ done - if [ $SEGACDBIOS = true ]; then + if [ $SEGACDBIOS == true ]; then echo "true"; else echo "false"; @@ -119,7 +119,7 @@ checkSaturnBios(){ SaturnBios=(af5828fdff51384f99b3c4926be27762 85ec9ca47d8f6807718151cbcca8b964 f273555d7d91e8a5a6bfd9bcf066331c 3240872c70984b6cbfda1586cab68dbe ac4e4b6522e200c0d23d371a8cecbfd3 3ea3202e2634cb47cb90f3a05c015010 cb2cebc1b6e573b7c44523d037edcd45 0306c0e408d6682dd2d86324bd4ac661) for i in "${SaturnBios[@]}" do - if [[ "$md5" = *"${i}"* ]]; then + if [[ "$md5" == *"${i}"* ]]; then SATURNBIOS=true break else @@ -131,7 +131,7 @@ checkSaturnBios(){ done - if [ $SATURNBIOS = true ]; then + if [ $SATURNBIOS == true ]; then echo "true"; else echo "false"; @@ -152,7 +152,7 @@ checkDreamcastBios(){ local hashes=(d407fcf70b56acb84b8c77c93b0e5327 e10c53c2f8b90bab96ead2d368858623 93a9766f14159b403178ac77417c6b68 0a93f7940c455905bea6e392dfde92a4) for i in "${hashes[@]}" do - if [[ "$md5" = *"${i}"* ]]; then + if [[ "$md5" == *"${i}"* ]]; then BIOS=true break else @@ -164,7 +164,7 @@ checkDreamcastBios(){ done - if [ $BIOS = true ]; then + if [ $BIOS == true ]; then echo "true"; else echo "false"; @@ -184,7 +184,7 @@ checkDSBios(){ local hashes=(145eaef5bd3037cbc247c213bb3da1b3 df692a80a5b1bc90728bc3dfc76cd948 a392174eb3e572fed6447e956bde4b25) for i in "${hashes[@]}" do - if [[ "$md5" = *"${i}"* ]]; then + if [[ "$md5" == *"${i}"* ]]; then BIOS=true break else @@ -196,7 +196,7 @@ checkDSBios(){ done - if [ $BIOS = true ]; then + if [ $BIOS == true ]; then echo "true"; else echo "false"; diff --git a/functions/cloudServicesManager.sh b/functions/cloudServicesManager.sh index 9c5c8db3..537d43b4 100755 --- a/functions/cloudServicesManager.sh +++ b/functions/cloudServicesManager.sh @@ -102,7 +102,7 @@ manageServicesMenu() { # Check if installed isInstalled() { local ID="$1" - if [ "$(flatpak --columns=app list | grep "$1")" = "$1" ]; then + if [ "$(flatpak --columns=app list | grep "$1")" == "$1" ]; then return 1 else return 0 @@ -124,7 +124,7 @@ manageRPSMenu() { declare -a arrAllRP=() Chiaki_IsInstalled ans=$? - if [ "$ans" = "1" ]; then + if [ "$ans" == "1" ]; then arrAllRP+=(true "Chiaki") else arrAllRP+=(false "Chiaki") @@ -132,7 +132,7 @@ manageRPSMenu() { Greenlight_IsInstalled ans=$? - if [ "$ans" = "1" ]; then + if [ "$ans" == "1" ]; then arrAllRP+=(true "Greenlight") else arrAllRP+=(false "Greenlight") @@ -140,7 +140,7 @@ manageRPSMenu() { Moonlight_IsInstalled ans=$? - if [ "$ans" = "1" ]; then + if [ "$ans" == "1" ]; then arrAllRP+=(true "Moonlight") else arrAllRP+=(false "Moonlight") @@ -148,7 +148,7 @@ manageRPSMenu() { Parsec_IsInstalled ans=$? - if [ "$ans" = "1" ]; then + if [ "$ans" == "1" ]; then arrAllRP+=(true "Parsec") else arrAllRP+=(false "Parsec") @@ -171,34 +171,34 @@ manageRPSMenu() { IFS='|' read -r -a arrChosen <<< "$RP" for i in "${arrChosen[@]}"; do # Install/Update selected - if [ "$i" = "Chiaki" ]; then + if [ "$i" == "Chiaki" ]; then Chiaki_IsInstalled ans=$? - if [ "$ans" = "1" ]; then + if [ "$ans" == "1" ]; then Chiaki_update else Chiaki_install fi - elif [ "$i" = "Greenlight" ]; then + elif [ "$i" == "Greenlight" ]; then Greenlight_IsInstalled ans=$? - if [ "$ans" = "1" ]; then + if [ "$ans" == "1" ]; then Greenlight_update else Greenlight_install fi - elif [ "$i" = "Moonlight" ]; then + elif [ "$i" == "Moonlight" ]; then Moonlight_IsInstalled ans=$? - if [ "$ans" = "1" ]; then + if [ "$ans" == "1" ]; then Moonlight_update else Moonlight_install fi - elif [ "$i" = "Parsec" ]; then + elif [ "$i" == "Parsec" ]; then Parsec_IsInstalled ans=$? - if [ "$ans" = "1" ]; then + if [ "$ans" == "1" ]; then Parsec_update else Parsec_install @@ -248,7 +248,7 @@ changeSettingsMenu() { ) isInstalled "$defaultBrowser" ans=$? - if [ "$ans" = "1" ]; then + if [ "$ans" == "1" ]; then arrBrowsOpts+=(false "System Default: $defaultBrowser" true) else arrBrowsOpts+=(false "System Default: $defaultBrowser" false) @@ -256,7 +256,7 @@ changeSettingsMenu() { # Add supported browsers to selection list for brows in "${arrSupBrows[@]}"; do - if [[ "$(flatpak --columns=app list | grep "${brows}")" = *"${brows}"* ]]; then + if [[ "$(flatpak --columns=app list | grep "${brows}")" == *"${brows}"* ]]; then arrBrowsOpts+=(false "$brows" true) else arrBrowsOpts+=(false "$brows" false) @@ -277,10 +277,10 @@ changeSettingsMenu() { arrChosen=() IFS='|' read -r -a arrChosen <<< "$BROWSER" for BROWSER in "${arrChosen[@]}"; do - if [ "$BROWSER" = "System Default: $defaultBrowser" ]; then + if [ "$BROWSER" == "System Default: $defaultBrowser" ]; then isInstalled "$defaultBrowser" ans=$? - if [ "$ans" = "0" ]; then + if [ "$ans" == "0" ]; then installFP "$defaultBrowser" fi setCloudSetting BROWSERAPP "$defaultBrowser" @@ -288,7 +288,7 @@ changeSettingsMenu() { else isInstalled "$BROWSER" ans=$? - if [ "$ans" = "0" ]; then + if [ "$ans" == "0" ]; then installFP "$BROWSER" fi setCloudSetting BROWSERAPP "$BROWSER" @@ -348,20 +348,20 @@ csmMainMenu() { exit fi - if [ "$CHOICE" = "Manage Cloud Services" ]; then + if [ "$CHOICE" == "Manage Cloud Services" ]; then manageServicesMenu - elif [ "$CHOICE" = "Manage Remote Play Clients" ]; then + elif [ "$CHOICE" == "Manage Remote Play Clients" ]; then manageRPSMenu - elif [ "$CHOICE" = "Change Settings" ]; then + elif [ "$CHOICE" == "Change Settings" ]; then changeSettingsMenu - elif [ "$CHOICE" = "Quit" ]; then + elif [ "$CHOICE" == "Quit" ]; then exit fi } fixCloudScripts() { ###v1.0 Fixes - if [ "$cloudconfversion" = "" ]; then + if [ "$cloudconfversion" == "" ]; then ### Substitute "BROWSERAPP" for "FILEFORWARDING" in cloud scripts and cloud.conf cd "$romsPath/cloud" for file in ./*.sh; do @@ -409,7 +409,7 @@ fixCloudScripts() { # Initialization # ################## -if [[ "$EMUDECKGIT" = "" ]]; then +if [[ "$EMUDECKGIT" == "" ]]; then EMUDECKGIT="$HOME/.config/EmuDeck/backend" fi LOCALCLOUDFILES="$EMUDECKGIT/tools/cloud" diff --git a/functions/configEmuAI.sh b/functions/configEmuAI.sh index f117288f..9279ca3f 100644 --- a/functions/configEmuAI.sh +++ b/functions/configEmuAI.sh @@ -7,7 +7,7 @@ configEmuAI(){ gitLocation=$4 overwrite=$5 - if [[ $overwrite = 'true' ]]; then + if [[ $overwrite == 'true' ]]; then overwrite="--backup --suffix=.bak" else overwrite="--ignore-existing" diff --git a/functions/configEmuFP.sh b/functions/configEmuFP.sh index 61735431..4a4116f8 100644 --- a/functions/configEmuFP.sh +++ b/functions/configEmuFP.sh @@ -5,7 +5,7 @@ configEmuFP(){ ID=$2 overwrite=$3 - if [[ $overwrite = 'true' ]]; then + if [[ $overwrite == 'true' ]]; then overwrite="--backup --suffix=.bak" else overwrite="--ignore-existing" diff --git a/functions/dialogBox.sh b/functions/dialogBox.sh index 9175a705..86b019dc 100644 --- a/functions/dialogBox.sh +++ b/functions/dialogBox.sh @@ -36,7 +36,7 @@ function Filebrowser() fi curdir=$(pwd) - if [ "$curdir" = "/" ] ; then # Check if you are at root folder + if [ "$curdir" == "/" ] ; then # Check if you are at root folder selection=$(whiptail --title "$1" \ --menu "PgUp/PgDn/Arrow Enter Selects File/Folder\nor Tab Key\n$curdir" 0 0 0 \ --cancel-button Cancel \ @@ -55,7 +55,7 @@ function Filebrowser() if [[ -d "$selection" ]]; then # Check if Directory Selected Filebrowser "$1" "$selection" elif [[ -f "$selection" ]]; then # Check if File Selected - if [[ $selection = *$filext ]]; then # Check if selected File has .jpg extension + if [[ $selection == *$filext ]]; then # Check if selected File has .jpg extension if (whiptail --title "Confirm Selection" --yesno "DirPath : $curdir\nFileName: $selection" 0 0 \ --yes-button "Confirm" \ --no-button "Retry"); then diff --git a/functions/helperFunctions.sh b/functions/helperFunctions.sh index 1c465d63..7f0cbea7 100644 --- a/functions/helperFunctions.sh +++ b/functions/helperFunctions.sh @@ -40,9 +40,9 @@ function getScreenAR(){ fi aspectRatio=$(awk -v screenWidth="$screenWidth" -v screenHeight="$screenHeight" 'BEGIN{printf "%.2f\n", (screenWidth/screenHeight)}') - if [ "$aspectRatio" = 1.60 ]; then + if [ "$aspectRatio" == 1.60 ]; then ar=1610 - elif [ "$aspectRatio" = 1.78 ]; then + elif [ "$aspectRatio" == 1.78 ]; then ar=169 else ar=0 @@ -107,7 +107,7 @@ function testLocationValid(){ local testLocation=$2 local result="" - if [[ "$testLocation" = *" "* ]]; then + if [[ "$testLocation" == *" "* ]]; then result="Invalid: $locationName contains spaces" else touch "$testLocation/testwrite" @@ -192,13 +192,13 @@ function setSetting () { local new_val=$2 settingExists=$(grep -rw "$emuDecksettingsFile" -e "$var") - if [[ $settingExists = '' ]]; then + if [[ $settingExists == '' ]]; then #insert setting to end echo "variable not found in settings. Adding $var=$new_val to $emuDecksettingsFile" sed -i -e '$a\'"$var=$new_val" "$emuDecksettingsFile" - elif [[ ! $settingExists = '' ]]; then + elif [[ ! $settingExists == '' ]]; then echo "Old value $settingExists" - if [[ $settingExists = "$var=$new_val" ]]; then + if [[ $settingExists == "$var=$new_val" ]]; then echo "Setting unchanged, skipping" else changeLine "$var=" "$var=$new_val" "$emuDecksettingsFile" @@ -232,7 +232,7 @@ function updateOrAppendConfigLine(){ touch "$configFile" local optionFound=$(grep -rnw "$configFile" -e "$option") - if [[ "$optionFound" = '' ]]; then + if [[ "$optionFound" == '' ]]; then echo "appending: $replacement to $configFile" echo "$replacement" >> "$configFile" else @@ -375,13 +375,13 @@ function checkForFile(){ local file=$1 local delete=$2 local finished=false - while [ $finished = false ] + while [ $finished == false ] do test=$(test -f "$file" && echo true) - if [[ $test = true ]]; then + if [[ $test == true ]]; then finished=true; clear - if [[ $delete = 'delete' ]]; then + if [[ $delete == 'delete' ]]; then rm "$file" fi echo 'true'; @@ -397,7 +397,7 @@ function getLatestReleaseURLGH(){ local url #local token=$(tokenGenerator) - if [ "$url" = "" ]; then + if [ "$url" == "" ]; then url="https://api.github.com/repos/${repository}/releases/latest" fi @@ -412,15 +412,15 @@ function getReleaseURLGH(){ local fileNameContains=$3 #local token=$(tokenGenerator) - if [ $system = "darwin" ]; then + if [ $system == "darwin" ]; then fileType="dmg" fi - if [ $system = "darwin" ]; then + if [ $system == "darwin" ]; then fileType="dmg" fi - if [ "$url" = "" ]; then + if [ "$url" == "" ]; then url="https://api.github.com/repos/$repository/releases" fi @@ -444,7 +444,7 @@ function linkToSaveFolder(){ if [ ! -L "$savesPath/$emu/$folderName" ]; then echo "$savesPath/$emu/$folderName is not a link. Please check it." else - if [ $(readlink $savesPath/$emu/$folderName) = $path ]; then + if [ $(readlink $savesPath/$emu/$folderName) == $path ]; then echo "$savesPath/$emu/$folderName is already linked." echo " Target: $(readlink $savesPath/$emu/$folderName)" else @@ -468,7 +468,7 @@ function moveSaveFolder(){ if [[ ! -e "$savesPath/$emu/$folderName" ]]; then mkdir -p "$savesPath/$emu/$folderName" - if [[ "$linkedTarget" = "$path" ]]; then + if [[ "$linkedTarget" == "$path" ]]; then setMSG "Moving $emu $folderName to the Emulation/saves/$emu/$folderName folder" rsync -avh "$path/" "$savesPath/$emu/$folderName" && mv "$path" "${path}.bak" ln -sn "$savesPath/$emu/$folderName" "$path" @@ -538,7 +538,7 @@ function desktopShortcutFieldUpdate(){ if [ -f "$shortcutFile" ]; then # update icon if name is updated - if [ "$shortcutKey" = "Name" ]; then + if [ "$shortcutKey" == "Name" ]; then name=$shortcutValue cp -v "$EMUDECKGIT/icons/$(cut -d " " -f1 <<< "$name").{svg,jpg,png}" "$HOME/.local/share/icons/emudeck/" 2>/dev/null icon=$(find "$HOME/.local/share/icons/emudeck/" -type f \( -iname "$(cut -d " " -f1 <<< "$name").svg" -o -iname "$(cut -d " " -f1 <<< "$name").jpg" -o -iname "$(cut -d " " -f1 <<< "$name").png" \) -print -quit) @@ -667,7 +667,7 @@ safeDownload() { echo "- $headers" - if [ "$showProgress" = "true" ] || [[ $showProgress -eq 1 ]]; then + if [ "$showProgress" == "true" ] || [[ $showProgress -eq 1 ]]; then request=$(curl -w $'\1'"%{response_code}" --fail -L "$url" -H "$headers" -o "$outFile.temp" 2>&1 | tee >(stdbuf -oL tr '\r' '\n' | sed -u 's/^ *\([0-9][0-9]*\).*\( [0-9].*$\)/\1\n#Download Speed\:\2/' | zenity --progress --title "Downloading $name" --width 600 --auto-close --no-cancel 2>/dev/null) && echo $'\2'${PIPESTATUS[0]}) else request=$(curl -w $'\1'"%{response_code}" --fail -L "$url" -H "$headers" -o "$outFile.temp" 2>&1 && echo $'\2'0 || echo $'\2'$?) @@ -679,7 +679,7 @@ safeDownload() { echo "$requestInfo" echo "HTTP response code: $httpCode" echo "CURL exit code: $exitCode" - if [ "$httpCode" = "200" ] && [ "$exitCode" = "0" ]; then + if [ "$httpCode" = "200" ] && [ "$exitCode" == "0" ]; then echo "$name downloaded successfully"; mv -v "$outFile.temp" "$outFile" return 0 diff --git a/functions/installEmuAI.sh b/functions/installEmuAI.sh index 5c35c15d..b892b799 100644 --- a/functions/installEmuAI.sh +++ b/functions/installEmuAI.sh @@ -7,7 +7,7 @@ installEmuAI(){ local lastVerFile="$5" local latestVer="$6" - if [[ "$fileName" = "" ]]; then + if [[ "$fileName" == "" ]]; then fileName="$name" fi echo "$name" diff --git a/functions/installEmuBI.sh b/functions/installEmuBI.sh index c91d8a37..a81ff536 100644 --- a/functions/installEmuBI.sh +++ b/functions/installEmuBI.sh @@ -8,7 +8,7 @@ installEmuBI(){ local lastVerFile="$6" local latestVer="$7" - if [[ "$fileName" = "" ]]; then + if [[ "$fileName" == "" ]]; then fileName="$name" fi echo "$name" diff --git a/functions/installEmuFP.sh b/functions/installEmuFP.sh index 8f4fe9e2..d3a9d0a4 100644 --- a/functions/installEmuFP.sh +++ b/functions/installEmuFP.sh @@ -11,7 +11,7 @@ installEmuFP(){ flatpak override "$ID" --filesystem=host --user flatpak override "$ID" --share=network --user #remove old system flatpak after we detect user flatpak is installed - if [ "$(flatpak --columns=app list --user | grep "$ID")" = "$ID" ]; then + if [ "$(flatpak --columns=app list --user | grep "$ID")" == "$ID" ]; then flatpak uninstall "$ID" --system -y fi diff --git a/functions/installToolAI.sh b/functions/installToolAI.sh index 1e478f60..dd0cfd18 100644 --- a/functions/installToolAI.sh +++ b/functions/installToolAI.sh @@ -7,7 +7,7 @@ installToolAI(){ local lastVerFile="$5" local latestVer="$6" - if [[ "$fileName" = "" ]]; then + if [[ "$fileName" == "" ]]; then fileName="$name" fi echo "$name" @@ -45,7 +45,7 @@ installToolAI(){ # echo "deploying $l" # launcherFileName=$(basename "$l") # folderName=$(dirname "$l" | sed 's!.*/!!') -# if [ $folderName = "launchers" ]; then +# if [ $folderName == "launchers" ]; then # folderName="" # fi # chmod +x "$l" diff --git a/functions/migrateAndLinkConfig.sh b/functions/migrateAndLinkConfig.sh index b795a8a6..781afd1e 100644 --- a/functions/migrateAndLinkConfig.sh +++ b/functions/migrateAndLinkConfig.sh @@ -32,7 +32,7 @@ if [ ! -f "$migrationFlag" ]; then doMigrate="Migrate Data" echo "$emu Do migration? User chose: $doMigrate" - if [ "$doMigrate" = "Migrate Data" ]; then + if [ "$doMigrate" == "Migrate Data" ]; then n=$(( ${#migrationTable[@]} - 1 )) #odd should be flatpak #even should be appimage @@ -53,11 +53,11 @@ if [ ! -f "$migrationFlag" ]; then --extra-button "Keep AppImage Data" \ --extra-button "Migrate Flatpak Data" 2>/dev/null) rc=$? - if [[ ! $ans = "" ]]; then #user didn't cancel + if [[ ! $ans == "" ]]; then #user didn't cancel echo "$emu flatpak/appimage data choice. User Chose: $ans" for ((i=0; i<=n; i=(i+2))) { # for each pair of dirs - if [[ $ans = "Migrate Flatpak Data" ]]; then + if [[ $ans == "Migrate Flatpak Data" ]]; then fromDir=${migrationTable[i]} toDir=${migrationTable[i+1]} echo "Migrating ${fromDir} to ${toDir}" @@ -79,7 +79,7 @@ if [ ! -f "$migrationFlag" ]; then #link .config to .var so flatpak still works ln -sfn ${toDir} . - elif [[ $ans = "Keep AppImage Data" ]]; then + elif [[ $ans == "Keep AppImage Data" ]]; then fromDir=${migrationTable[i+1]} toDir=${migrationTable[i]} cd ${toDir} @@ -121,7 +121,7 @@ if [ ! -f "$migrationFlag" ]; then echo "do nothing" fi touch $migrationFlag - elif [ $doMigrate = "Leave ${emu} alone forever" ]; then + elif [ $doMigrate == "Leave ${emu} alone forever" ]; then touch $migrationFlag fi fi diff --git a/install-darwin.sh b/install-darwin.sh index 13c2b709..c6672e01 100644 --- a/install-darwin.sh +++ b/install-darwin.sh @@ -9,7 +9,7 @@ function getLatestReleaseURLGH(){ local url #local token=$(tokenGenerator) - if [ "$url" = "" ]; then + if [ "$url" == "" ]; then url="https://api.github.com/repos/${repository}/releases/latest" fi @@ -32,7 +32,7 @@ safeDownload() { local outFile="$3" local showProgress="$4" local headers="$5" - if [ "$showProgress" = "true" ]; then + if [ "$showProgress" == "true" ]; then echo "safeDownload()" echo "- $name" echo "- $url" @@ -47,7 +47,7 @@ safeDownload() { httpCode="${returnCodes%$'\2'*}" exitCode="${returnCodes#*$'\2'}" - if [ "$httpCode" = "200" ] && [ "$exitCode" = "0" ]; then + if [ "$httpCode" = "200" ] && [ "$exitCode" == "0" ]; then #echo "$name downloaded successfully"; mv -v "$outFile.temp" "$outFile" &>/dev/null volumeName=$(yes | hdiutil attach "$outFile" | grep -o '/Volumes/.*$') @@ -74,13 +74,13 @@ function prompt() { EOT } -if [ $hasBrew = "false" ]; then +if [ $hasBrew == "false" ]; then pass="$(prompt 'EmuDeck needs to install Brew, and for that you need to input your password:' '')" echo $pass | sudo -v -S && { NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSLk https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" } - if [ $appleChip = "arm64" ];then + if [ $appleChip == "arm64" ];then echo "export PATH=/opt/homebrew/bin:$PATH" >> ~/.bash_profile && source ~/.bash_profile echo "export PATH=/opt/homebrew/bin:$PATH" >> ~/.zshrc && source ~/.zshrc else @@ -101,7 +101,7 @@ fi alert "All prerequisite packages have been installed. EmuDeck's DMG will be installed now!. Please press OK" -if [ $appleChip = "arm64" ];then +if [ $appleChip == "arm64" ];then EmuDeckURL="$(getLatestReleaseURLGH "EmuDeck/emudeck-electron-early" "arm64.dmg")" else EmuDeckURL="$(getLatestReleaseURLGH "EmuDeck/emudeck-electron-early" ".dmg")" diff --git a/install.sh b/install.sh index 210efa69..707e4b3e 100644 --- a/install.sh +++ b/install.sh @@ -15,12 +15,12 @@ elif [ $linuxID != "SteamOS" ]; then PASSWD="$(zenity --password --title="Password Entry" --text="Enter you user sudo password to install required depencies" 2>/dev/null)" echo "$PASSWD" | sudo -v -S ans=$? - if [[ $ans = 1 ]]; then + if [[ $ans == 1 ]]; then #incorrect password PASSWD="$(zenity --password --title="Password Entry" --text="Password was incorrect. Try again. (Did you remember to set a password for linux before running this?)" 2>/dev/null)" echo "$PASSWD" | sudo -v -S ans=$? - if [[ $ans = 1 ]]; then + if [[ $ans == 1 ]]; then text="$(printf "Password not accepted.\n Expert mode tools which require a password will not work. Disabling them.")" zenity --error \ --title="EmuDeck" \ diff --git a/installCLI.sh b/installCLI.sh index 53da2b28..e66a2b12 100755 --- a/installCLI.sh +++ b/installCLI.sh @@ -22,13 +22,13 @@ function setSetting() { local new_val=$2 settingExists=$(grep -rw "$emuDecksettingsFile" -e "$var") - if [[ $settingExists = '' ]]; then + if [[ $settingExists == '' ]]; then #insert setting to end echo "variable not found in settings. Adding $var=$new_val to $emuDecksettingsFile" sed -i -e '$a\'"$var=$new_val" "$emuDecksettingsFile" - elif [[ ! $settingExists = '' ]]; then + elif [[ ! $settingExists == '' ]]; then echo "Old value $settingExists" - if [[ $settingExists = "$var=$new_val" ]]; then + if [[ $settingExists == "$var=$new_val" ]]; then echo "Setting unchanged, skipping" else changeLine "$var=" "$var=$new_val" "$emuDecksettingsFile" @@ -166,7 +166,7 @@ setDefaults # Welcome, Quick or custom? source "$EMUDECKGIT"/whiptail/WelcomePage.sh -if [ $expert = 'false' ]; then +if [ $expert == 'false' ]; then cp "$EMUDECKGIT/settings.sh" "$emuDecksettingsFile" fi @@ -179,12 +179,12 @@ source "$EMUDECKGIT"/whiptail/RomStoragePage.sh ## Custom mode Questions # -if [ $expert = 'true' ]; then +if [ $expert == 'true' ]; then # Emulators source $EMUDECKGIT/whiptail/EmulatorSelectorPage.sh - # if [ $second = true ]; then + # if [ $second == true ]; then # # Overwrite configuration? # source "$EMUDECKGIT"/whiptail/EmulatorConfigurationPage.sh # fi @@ -219,7 +219,7 @@ if [ $expert = 'true' ]; then source "$EMUDECKGIT"/whiptail/PegasusInstallPage.sh # Pegasus Theme - if [ $doInstallPegasus = true ]; then + if [ $doInstallPegasus == true ]; then source "$EMUDECKGIT"/whiptail/PegasusThemePage.sh fi diff --git a/setup.sh b/setup.sh index 2f493e12..1ff70e78 100644 --- a/setup.sh +++ b/setup.sh @@ -147,133 +147,133 @@ cp "${EMUDECKGIT}/tools/emu-launch.sh" "${toolsPath}/emu-launch.sh" chmod +x "${toolsPath}/emu-launch.sh" #ESDE Installation -if [ $doInstallESDE = "true" ]; then +if [ $doInstallESDE == "true" ]; then echo "install esde" ESDE_install fi #Pegasus Installation -if [ $doInstallPegasus = "true" ]; then +if [ $doInstallPegasus == "true" ]; then echo "install Pegasus" Pegasus_install fi #SRM Installation -if [ $doInstallSRM = "true" ]; then +if [ $doInstallSRM == "true" ]; then echo "install srm" SRM_install fi -if [ "$doInstallPCSX2QT" = "true" ]; then +if [ "$doInstallPCSX2QT" == "true" ]; then echo "install pcsx2Qt" PCSX2QT_install fi -if [ $doInstallPrimeHack = "true" ]; then +if [ $doInstallPrimeHack == "true" ]; then echo "install primehack" Primehack_install fi -if [ $doInstallRPCS3 = "true" ]; then +if [ $doInstallRPCS3 == "true" ]; then echo "install rpcs3" RPCS3_install fi -if [ $doInstallCitra = "true" ]; then +if [ $doInstallCitra == "true" ]; then echo "install Citra" Citra_install fi -if [ $doInstallDolphin = "true" ]; then +if [ $doInstallDolphin == "true" ]; then echo "install Dolphin" Dolphin_install fi -if [ $doInstallDuck = "true" ]; then +if [ $doInstallDuck == "true" ]; then echo "DuckStation_install" DuckStation_install fi -if [ $doInstallRA = "true" ]; then +if [ $doInstallRA == "true" ]; then echo "RetroArch_install" RetroArch_install fi -if [ $doInstallRMG = "true" ]; then +if [ $doInstallRMG == "true" ]; then echo "RMG_install" RMG_install fi -if [ $doInstallares = "true" ]; then +if [ $doInstallares == "true" ]; then echo "ares_install" ares_install fi -if [ $doInstallPPSSPP = "true" ]; then +if [ $doInstallPPSSPP == "true" ]; then echo "PPSSPP_install" PPSSPP_install fi -if [ $doInstallYuzu = "true" ]; then +if [ $doInstallYuzu == "true" ]; then echo "Yuzu_install" Yuzu_install fi -if [ $doInstallRyujinx = "true" ]; then +if [ $doInstallRyujinx == "true" ]; then echo "Ryujinx_install" Ryujinx_install fi -if [ $doInstallMAME = "true" ]; then +if [ $doInstallMAME == "true" ]; then echo "MAME_install" MAME_install fi -if [ $doInstallXemu = "true" ]; then +if [ $doInstallXemu == "true" ]; then echo "Xemu_install" Xemu_install fi -if [ $doInstallCemu = "true" ]; then +if [ $doInstallCemu == "true" ]; then echo "Cemu_install" Cemu_install fi -if [ "${doInstallCemuNative}" = "true" ]; then +if [ "${doInstallCemuNative}" == "true" ]; then echo "CemuNative_install" CemuNative_install fi -if [ $doInstallScummVM = "true" ]; then +if [ $doInstallScummVM == "true" ]; then echo "ScummVM_install" ScummVM_install fi -if [ $doInstallVita3K = "true" ]; then +if [ $doInstallVita3K == "true" ]; then echo "Vita3K_install" Vita3K_install fi -if [ $doInstallMGBA = "true" ]; then +if [ $doInstallMGBA == "true" ]; then echo "mGBA_install" mGBA_install fi -if [ $doInstallFlycast = "true" ]; then +if [ $doInstallFlycast == "true" ]; then echo "Flycast_install" Flycast_install fi -if [ $doInstallRMG = "true" ]; then +if [ $doInstallRMG == "true" ]; then echo "RMG_install" RMG_install fi -if [ $doInstallares = "true" ]; then +if [ $doInstallares == "true" ]; then echo "ares_install" ares_install fi -if [ $doInstallmelonDS = "true" ]; then +if [ $doInstallmelonDS == "true" ]; then echo "melonDS_install" melonDS_install fi #Xenia - We need to install Xenia after creating the Roms folders! -if [ "$doInstallXenia" = "true" ]; then +if [ "$doInstallXenia" == "true" ]; then echo "Xenia_install" Xenia_install fi #Steam RomManager Config -if [ "$doSetupSRM" = "true" ]; then +if [ "$doSetupSRM" == "true" ]; then echo "SRM_init" SRM_init fi #ESDE Config -if [ "$doSetupESDE" = "true" ]; then +if [ "$doSetupESDE" == "true" ]; then echo "ESDE_init" ESDE_update fi #Pegasus Config -#if [ $doSetupPegasus = "true" ]; then +#if [ $doSetupPegasus == "true" ]; then # echo "Pegasus_init" # Pegasus_init #fi @@ -284,92 +284,92 @@ fi setMSG "Configuring emulators.." -if [ "$doSetupRA" = "true" ]; then +if [ "$doSetupRA" == "true" ]; then echo "RetroArch_init" RetroArch_init fi -if [ "$doSetupPrimehack" = "true" ]; then +if [ "$doSetupPrimehack" == "true" ]; then echo "Primehack_init" Primehack_init fi -if [ "$doSetupDolphin" = "true" ]; then +if [ "$doSetupDolphin" == "true" ]; then echo "Dolphin_init" Dolphin_init fi -if [ "$doSetupPCSX2QT" = "true" ]; then +if [ "$doSetupPCSX2QT" == "true" ]; then echo "PCSX2QT_init" PCSX2QT_init fi -if [ "$doSetupRPCS3" = "true" ]; then +if [ "$doSetupRPCS3" == "true" ]; then echo "RPCS3_init" RPCS3_init fi -if [ "$doSetupCitra" = "true" ]; then +if [ "$doSetupCitra" == "true" ]; then echo "Citra_init" Citra_init fi -if [ "$doSetupDuck" = "true" ]; then +if [ "$doSetupDuck" == "true" ]; then echo "DuckStation_init" DuckStation_init fi -if [ "$doSetupYuzu" = "true" ]; then +if [ "$doSetupYuzu" == "true" ]; then echo "Yuzu_init" Yuzu_init fi -if [ "$doSetupRyujinx" = "true" ]; then +if [ "$doSetupRyujinx" == "true" ]; then echo "Ryujinx_init" Ryujinx_init fi -if [ "$doSetupPPSSPP" = "true" ]; then +if [ "$doSetupPPSSPP" == "true" ]; then echo "PPSSPP_init" PPSSPP_init fi -if [ "$doSetupXemu" = "true" ]; then +if [ "$doSetupXemu" == "true" ]; then echo "Xemu_init" Xemu_init fi -if [ "$doSetupMAME" = "true" ]; then +if [ "$doSetupMAME" == "true" ]; then echo "MAME_init" MAME_init fi -if [ "$doSetupScummVM" = "true" ]; then +if [ "$doSetupScummVM" == "true" ]; then echo "ScummVM_init" ScummVM_init fi -if [ "$doSetupVita3K" = "true" ]; then +if [ "$doSetupVita3K" == "true" ]; then echo "Vita3K_init" Vita3K_init fi -if [ "$doSetupRMG" = "true" ]; then +if [ "$doSetupRMG" == "true" ]; then echo "RMG_init" RMG_init fi -if [ "$doSetupares" = "true" ]; then +if [ "$doSetupares" == "true" ]; then echo "ares_init" ares_init fi -if [ "$doSetupmelonDS" = "true" ]; then +if [ "$doSetupmelonDS" == "true" ]; then echo "melonDS_init" melonDS_init fi -if [ "$doSetupMGBA" = "true" ]; then +if [ "$doSetupMGBA" == "true" ]; then echo "mGBA_init" mGBA_init fi -if [ "${doSetupCemuNative}" = "true" ]; then +if [ "${doSetupCemuNative}" == "true" ]; then echo "CemuNative_init" CemuNative_init fi -if [ "$doSetupFlycast" = "true" ]; then +if [ "$doSetupFlycast" == "true" ]; then echo "Flycast_init" Flycast_init fi #Proton Emus -if [ "$doSetupCemu" = "true" ]; then +if [ "$doSetupCemu" == "true" ]; then echo "Cemu_init" Cemu_init fi -if [ "$doSetupXenia" = "true" ]; then +if [ "$doSetupXenia" == "true" ]; then echo "Xenia_init" Xenia_init fi @@ -393,12 +393,12 @@ fi # if [ -n "$PASSWD" ]; then # pwstatus=0 # echo "$PASSWD" | sudo -v -S &>/dev/null && pwstatus=1 || echo "sudo password was incorrect" #refresh sudo cache -# if [ $pwstatus = 1 ]; then -# if [ "$doInstallGyro" = "true" ]; then +# if [ $pwstatus == 1 ]; then +# if [ "$doInstallGyro" == "true" ]; then # Plugins_installSteamDeckGyroDSU # fi # -# if [ "$doInstallPowertools" = "true" ]; then +# if [ "$doInstallPowertools" == "true" ]; then # Plugins_installPluginLoader # Plugins_installPowerTools # fi @@ -421,18 +421,18 @@ CHD_install # #Fixes for 16:9 Screens # -if [ "$doSetupRA" = "true" ]; then - if [ "$(getScreenAR)" = 169 ];then +if [ "$doSetupRA" == "true" ]; then + if [ "$(getScreenAR)" == 169 ];then nonDeck_169Screen fi #Anbernic Win600 Special configuration - if [ "$(getProductName)" = "Win600" ];then + if [ "$(getProductName)" == "Win600" ];then nonDeck_win600 fi fi -if [ "$system" = "chimeraos" ]; then +if [ "$system" == "chimeraos" ]; then mkdir -p $HOME/Applications downloads_dir="$HOME/Downloads" @@ -449,7 +449,7 @@ fi createDesktopIcons -if [ "$doInstallHomeBrewGames" = "true" ]; then +if [ "$doInstallHomeBrewGames" == "true" ]; then emuDeckInstallHomebrewGames fi @@ -460,7 +460,7 @@ fi # if [ "$system" != "darwin" ]; then #Decky Plugins - if [ "$system" = "chimeraos" ]; then + if [ "$system" == "chimeraos" ]; then defaultPass="gamer" else defaultPass="Decky!" @@ -469,7 +469,7 @@ if [ "$system" != "darwin" ]; then if ( echo "$defaultPass" | sudo -S -k true ); then echo $defaultPass | sudo -v -S && { Plugins_installEmuDecky $defaultPass - if [ "$system" = "chimeraos" ]; then + if [ "$system" == "chimeraos" ]; then Plugins_installPowerControl $defaultPass else Plugins_installPowerTools $defaultPass @@ -486,7 +486,7 @@ fi #chmod +x "${toolsPath}/updater/emudeck-updater.sh" #RemotePlayWhatever -# if [[ ! $branch = "main" ]]; then +# if [[ ! $branch == "main" ]]; then # RemotePlayWhatever_install # fi diff --git a/tools/appID.py b/tools/appID.py index 10cb71b5..5006194c 100644 --- a/tools/appID.py +++ b/tools/appID.py @@ -25,7 +25,7 @@ def main(): print(get_app_id(exe, appname)) -if __name__ = "__main__": +if __name__ == "__main__": # If there aren't the correct number of arguments, fail with error if len(sys.argv) != 3: sys.exit("Not enough arguments") diff --git a/tools/binupdate/binupdate.sh b/tools/binupdate/binupdate.sh index 8f706951..1557167e 100644 --- a/tools/binupdate/binupdate.sh +++ b/tools/binupdate/binupdate.sh @@ -3,7 +3,7 @@ # shellcheck source=functions/all.sh . "$HOME/.config/EmuDeck/backend/functions/all.sh" -if [ "$?" = "1" ]; then +if [ "$?" == "1" ]; then echo "functions could not be loaded." zenity --error \ --text="EmuDeck Functions could not be loaded. Please re-run Emudeck install." 2>/dev/null @@ -79,7 +79,7 @@ function runBinDownloads { echo "User selected: $binsToDL" - if [[ "$binsToDL" = *"esde"* ]]; then + if [[ "$binsToDL" == *"esde"* ]]; then echo "0" echo "# Updating EmulationStation-DE" if ESDE_install "true" 2>&1; then @@ -88,7 +88,7 @@ function runBinDownloads { messages+=("There was a problem updating EmulationStation-DE") fi fi - if [[ "$binsToDL" = *"srm"* ]]; then + if [[ "$binsToDL" == *"srm"* ]]; then ((progresspct += pct)) || true echo "$progresspct" echo "# Updating SteamRomManager" @@ -98,7 +98,7 @@ function runBinDownloads { messages+=("There was a problem updating SteamRomManager") fi fi - if [[ "$binsToDL" = *"mgba"* ]]; then + if [[ "$binsToDL" == *"mgba"* ]]; then ((progresspct += pct)) || true echo "$progresspct" echo "# Updating mGBA" @@ -108,7 +108,7 @@ function runBinDownloads { messages+=("There was a problem updating mGBA") fi fi - if [[ "$binsToDL" = *"yuzu (early access)"* ]]; then + if [[ "$binsToDL" == *"yuzu (early access)"* ]]; then ((progresspct += pct)) || true echo "$progresspct" echo "# Updating Yuzu Early Access" @@ -118,7 +118,7 @@ function runBinDownloads { messages+=("There was a problem updating Yuzu Early Access") fi fi - if [[ "$binsToDL" = *"yuzu (mainline)"* ]]; then + if [[ "$binsToDL" == *"yuzu (mainline)"* ]]; then ((progresspct += pct)) || true echo "$progresspct" echo "# Updating Yuzu" @@ -128,7 +128,7 @@ function runBinDownloads { messages+=("There was a problem updating Yuzu") fi fi - if [[ "$binsToDL" = *"pcsx2-qt"* ]]; then + if [[ "$binsToDL" == *"pcsx2-qt"* ]]; then ((progresspct += pct)) || true echo "$progresspct" echo "# Updating PCSX2-QT" @@ -138,7 +138,7 @@ function runBinDownloads { messages+=("There was a problem updating PCSX2-QT") fi fi - if [[ "$binsToDL" = *"ryujinx"* ]]; then + if [[ "$binsToDL" == *"ryujinx"* ]]; then ((progresspct += pct)) || true echo "$progresspct" echo "# Updating Ryujinx" @@ -148,7 +148,7 @@ function runBinDownloads { messages+=("There was a problem updating Ryujinx") fi fi - if [[ "$binsToDL" = *"cemu (win/proton)"* ]]; then + if [[ "$binsToDL" == *"cemu (win/proton)"* ]]; then ((progresspct += pct)) || true echo "$progresspct" echo "# Updating Cemu (win/proton)" @@ -158,7 +158,7 @@ function runBinDownloads { messages+=("There was a problem updating Cemu (win/proton") fi fi - if [[ "$binsToDL" = *"cemu (native)"* ]]; then + if [[ "$binsToDL" == *"cemu (native)"* ]]; then ((progresspct += pct)) || true echo "$progresspct" echo "# Updating Cemu (Native)" @@ -168,7 +168,7 @@ function runBinDownloads { messages+=("There was a problem updating Cemu (Native)") fi fi - if [[ "$binsToDL" = *"vita3k"* ]]; then + if [[ "$binsToDL" == *"vita3k"* ]]; then ((progresspct += pct)) || true echo "$progresspct" echo "# Updating Vita3K" @@ -178,7 +178,7 @@ function runBinDownloads { messages+=("There was a problem updating Vita3K") fi fi - if [[ "$binsToDL" = *"xenia"* ]]; then + if [[ "$binsToDL" == *"xenia"* ]]; then ((progresspct += pct)) || true echo "$progresspct" echo "# Updating Xenia-Canary" @@ -188,7 +188,7 @@ function runBinDownloads { messages+=("There was a problem updating Xenia") fi fi - if [[ "$binsToDL" = *"rpcs3"* ]]; then + if [[ "$binsToDL" == *"rpcs3"* ]]; then ((progresspct += pct)) || true echo "$progresspct" echo "# Updating RPCS3" @@ -212,40 +212,40 @@ LOGFILE="${scriptPath}/binupdate-$TIMESTAMP.log" exec > >(tee "${LOGFILE}") 2>&1 binTable=() -if [ "$(ESDE_IsInstalled)" = "true" ]; then +if [ "$(ESDE_IsInstalled)" == "true" ]; then binTable+=(TRUE "EmulationStation-DE" "esde") fi -if [ "$(SRM_IsInstalled)" = "true" ]; then +if [ "$(SRM_IsInstalled)" == "true" ]; then binTable+=(TRUE "Steam ROM Manager" "srm") fi -if [ "$(mGBA_IsInstalled)" = "true" ]; then +if [ "$(mGBA_IsInstalled)" == "true" ]; then binTable+=(TRUE "GameBoy / Color / Advance Emu" "mgba") fi -if [ "$(Yuzu_IsInstalled)" = "true" ]; then +if [ "$(Yuzu_IsInstalled)" == "true" ]; then binTable+=(TRUE "Nintendo Switch Emu" "yuzu (mainline)") fi -if [ "$(YuzuEA_IsInstalled)" = "true" ] && [ -e "$YuzuEA_tokenFile" ]; then +if [ "$(YuzuEA_IsInstalled)" == "true" ] && [ -e "$YuzuEA_tokenFile" ]; then binTable+=(TRUE "Nintendo Switch Emu" "yuzu (early access)") fi -if [ "$(Ryujinx_IsInstalled)" = "true" ]; then +if [ "$(Ryujinx_IsInstalled)" == "true" ]; then binTable+=(TRUE "Nintendo Switch Emu" "ryujinx") fi -if [ "$(PCSX2QT_IsInstalled)" = "true" ]; then +if [ "$(PCSX2QT_IsInstalled)" == "true" ]; then binTable+=(TRUE "Sony PlayStation 2 Emu" "pcsx2-qt") fi -if [ "$(Cemu_IsInstalled)" = "true" ]; then +if [ "$(Cemu_IsInstalled)" == "true" ]; then binTable+=(TRUE "Nintendo WiiU Emu (Proton)" "cemu (win/proton)") fi -if [ "$(CemuNative_IsInstalled)" = "true" ]; then +if [ "$(CemuNative_IsInstalled)" == "true" ]; then binTable+=(TRUE "Nintendo WiiU Emu (Native)" "cemu (native)") fi -if [ "$(Vita3K_IsInstalled)" = "true" ]; then +if [ "$(Vita3K_IsInstalled)" == "true" ]; then binTable+=(TRUE "Sony PlayStation Vita Emu" "vita3k") fi -if [ "$(Xenia_IsInstalled)" = "true" ]; then +if [ "$(Xenia_IsInstalled)" == "true" ]; then binTable+=(TRUE "Xbox 360 Emu" "xenia") fi -if [ "$(RPCS3_IsInstalled)" = "true" ]; then +if [ "$(RPCS3_IsInstalled)" == "true" ]; then binTable+=(TRUE "PlayStation 3 Emu" "rpcs3") fi diff --git a/tools/chdconv/chddeck.sh b/tools/chdconv/chddeck.sh index d8e572c3..6b59f043 100644 --- a/tools/chdconv/chddeck.sh +++ b/tools/chdconv/chddeck.sh @@ -2,7 +2,7 @@ # shellcheck source=/home/deck/emudeck/settings.sh . ~/emudeck/settings.sh -if [[ "$EMUDECKGIT" = "" ]]; then +if [[ "$EMUDECKGIT" == "" ]]; then EMUDECKGIT="$HOME/.config/EmuDeck/backend" fi @@ -35,9 +35,9 @@ compressCHD() { CUEDIR="$(dirname "${file}")" echo "Compressing ${file%.*}.chd" chdman5 createcd -i "$file" -o "${file%.*}.chd" && successful="true" - if [[ $successful = "true" ]]; then + if [[ $successful == "true" ]]; then echo "successfully created ${file%.*}.chd" - if [[ ! ("$fileType" = 'iso' || "$fileType" = 'ISO') ]]; then + if [[ ! ("$fileType" == 'iso' || "$fileType" == 'ISO') ]]; then find "${CUEDIR}" -maxdepth 1 -type f | while read -r b; do fileName="$(basename "${b}")" found=$(grep "${fileName}" "${file}") @@ -58,7 +58,7 @@ compressRVZ() { local file=$1 local successful='' ${dolphintool} convert -f rvz -b 131072 -c zstd -l 5 -i "$file" -o "${file%.*}.rvz" && successful="true" - if [[ $successful = "true" ]]; then + if [[ $successful == "true" ]]; then echo "$file succesfully converted to ${file%.*}.rvz" rm -f "$file" else @@ -71,7 +71,7 @@ compressCSO() { local file=$1 local successful='' ciso 9 "$file" "${file%.*}.cso" && successful="true" - if [[ $successful = "true" ]]; then + if [[ $successful == "true" ]]; then echo "$file succesfully converted to ${file%.*}.cso" rm -f "$file" else @@ -91,7 +91,7 @@ selection=$(zenity --question \ --cancel-label="Exit" \ --text="${text}" 2>/dev/null && echo "bulk") -if [ "$selection" = "bulk" ]; then +if [ "$selection" == "bulk" ]; then #paths update via sed in main script #romsPath="/run/media/mmcblk0p1/Emulation/roms" #use path from settings @@ -129,7 +129,7 @@ if [ "$selection" = "bulk" ]; then fi done - if ((${#searchFolderList[@]} = 0)); then + if ((${#searchFolderList[@]} == 0)); then echo "No eligible files found." text="$(printf "No suitable roms were found for conversion.\n\nPlease check if you have any cue / gdi / iso files for compatible systems.")" zenity --error \ @@ -217,7 +217,7 @@ if [ "$selection" = "bulk" ]; then fi done -elif [ "$selection" = "Pick a file" ]; then +elif [ "$selection" == "Pick a file" ]; then #/bin/bash f=$(zenity --file-selection --file-filter='Discs (cue,gdi,iso,gcm) | *.cue *.gdi *.iso *.gcm' --file-filter='All files | *' 2>/dev/null) @@ -256,7 +256,7 @@ if [ "$uiMode" != 'zenity' ]; then --text="${text}" 2>/dev/null fi -if [ "$uiMode" = 'zenity' ]; then +if [ "$uiMode" == 'zenity' ]; then text="$(printf "Done!\n\n If you use Steam ROM Manager to catalog your games you will need to open it now to update your games")" zenity --question \ diff --git a/tools/cloudSync/cloud_sync_watcher.sh b/tools/cloudSync/cloud_sync_watcher.sh index 4d880033..9613b8a5 100644 --- a/tools/cloudSync/cloud_sync_watcher.sh +++ b/tools/cloudSync/cloud_sync_watcher.sh @@ -42,7 +42,7 @@ for dir in "$savesPath"/*/*; do done # Loop that runs every second -while [ 1 = 1 ] +while [ 1 == 1 ] do # Check for changes in hashes @@ -59,7 +59,7 @@ do fi - # if [[ $dir = *"citra/saves"* ]]; then + # if [[ $dir == *"citra/saves"* ]]; then # echo "$dir - ${current_hashes[$dir]}" >> $HOME/emudeck/logs/CloudWatcher.log # echo "$dir - $new_hash" >> $HOME/emudeck/logs/CloudWatcher.log # fi @@ -72,12 +72,12 @@ do # echo $currentEmu >> $HOME/emudeck/logs/CloudWatcher.log # echo $dir >> $HOME/emudeck/logs/CloudWatcher.log - if [ "${current_hashes[$dir]}" != "$new_hash" ] && [[ $dir = *"$currentEmu"* ]]; then + if [ "${current_hashes[$dir]}" != "$new_hash" ] && [[ $dir == *"$currentEmu"* ]]; then # Show the name of the folder immediately behind "saves" echo "SERVICE - CHANGES DETECTED on $dir, LETS CHECK IF ITS A DUPLICATE" >> $HOME/emudeck/logs/CloudWatcher.log timestamp=$(date +%s) - if [ $((timestamp - lastSavedTime)) = 0 ]; then + if [ $((timestamp - lastSavedTime)) == 0 ]; then echo "SERVICE - IGNORED, same timestamp" >> $HOME/emudeck/logs/CloudWatcher.log fi echo $((timestamp - lastSavedTime)) >> $HOME/emudeck/logs/CloudWatcher.log diff --git a/tools/emu-launch.sh b/tools/emu-launch.sh index d4c960c5..f0877ef4 100644 --- a/tools/emu-launch.sh +++ b/tools/emu-launch.sh @@ -140,7 +140,7 @@ main () { } # Only run if run directly -if [[ "${BASH_SOURCE[0]}" = "${0}" ]]; then +if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then # Get own directory selfDir="$( dirname "${BASH_SOURCE[0]}" )" diff --git a/tools/flatpakupdate/flatpakupdate.sh b/tools/flatpakupdate/flatpakupdate.sh index 922746ba..321265dc 100644 --- a/tools/flatpakupdate/flatpakupdate.sh +++ b/tools/flatpakupdate/flatpakupdate.sh @@ -1,6 +1,6 @@ #!/bin/bash . "$HOME/.config/EmuDeck/backend/functions/all.sh" -if [ "$?" = "1" ]; then +if [ "$?" == "1" ]; then echo "functions could not be loaded." zenity --error \ --text="EmuDeck Functions could not be loaded. Please re-run Emudeck install." 2>/dev/null @@ -8,39 +8,39 @@ if [ "$?" = "1" ]; then fi emuTable=() -if [ "$(RetroArch_IsInstalled)" = "true" ]; then +if [ "$(RetroArch_IsInstalled)" == "true" ]; then emuTable+=(TRUE "Multiple" "RetroArch") fi -if [ "$(Primehack_IsInstalled)" = "true" ]; then +if [ "$(Primehack_IsInstalled)" == "true" ]; then emuTable+=(TRUE "Metroid Prime" "PrimeHack") fi -if [ "$(RPCS3_IsInstalled)" = "true" ]; then +if [ "$(RPCS3_IsInstalled)" == "true" ]; then emuTable+=(TRUE "PS3" "RPCS3") fi -if [ "$(Citra_IsInstalled)" = "true" ]; then +if [ "$(Citra_IsInstalled)" == "true" ]; then emuTable+=(TRUE "3DS" "Citra") fi -if [ "$(Dolphin_IsInstalled)" = "true" ]; then +if [ "$(Dolphin_IsInstalled)" == "true" ]; then emuTable+=(TRUE "GC/Wii" "Dolphin") fi -if [ "$(DuckStation_IsInstalled)" = "true" ]; then +if [ "$(DuckStation_IsInstalled)" == "true" ]; then emuTable+=(TRUE "PSX" "DuckStation") fi -if [ "$(PPSSPP_IsInstalled)" = "true" ]; then +if [ "$(PPSSPP_IsInstalled)" == "true" ]; then emuTable+=(TRUE "PSP" "PPSSPP") fi -if [ "$(Xemu_IsInstalled)" = "true" ]; then +if [ "$(Xemu_IsInstalled)" == "true" ]; then emuTable+=(TRUE "XBox" "Xemu") fi -if [ "$(ScummVM_IsInstalled)" = "true" ]; then +if [ "$(ScummVM_IsInstalled)" == "true" ]; then emuTable+=(TRUE "Scumm/DOS" "ScummVM") fi -if [ "$(RMG_IsInstalled)" = "true" ]; then +if [ "$(RMG_IsInstalled)" == "true" ]; then emuTable+=(TRUE "N64" "RMG") fi -if [ "$(melonDS_IsInstalled)" = "true" ]; then +if [ "$(melonDS_IsInstalled)" == "true" ]; then emuTable+=(TRUE "DS" "melonDS") fi @@ -71,84 +71,84 @@ if [ "${#emuTable[@]}" -gt 0 ]; then echo "User selected: $emusToInstall" - if [[ "$emusToInstall" = *"RetroArch"* ]]; then + if [[ "$emusToInstall" == *"RetroArch"* ]]; then doUpdateRA=true fi - if [[ "$emusToInstall" = *"PrimeHack"* ]]; then + if [[ "$emusToInstall" == *"PrimeHack"* ]]; then doUpdatePrimeHack=true fi - if [[ "$emusToInstall" = *"RPCS3"* ]]; then + if [[ "$emusToInstall" == *"RPCS3"* ]]; then doUpdateRPCS3=true fi - if [[ "$emusToInstall" = *"Citra"* ]]; then + if [[ "$emusToInstall" == *"Citra"* ]]; then doUpdateCitra=true fi - if [[ "$emusToInstall" = *"Dolphin"* ]]; then + if [[ "$emusToInstall" == *"Dolphin"* ]]; then doUpdateDolphin=true fi - if [[ "$emusToInstall" = *"DuckStation"* ]]; then + if [[ "$emusToInstall" == *"DuckStation"* ]]; then doUpdateDuck=true fi - if [[ "$emusToInstall" = *"PPSSPP"* ]]; then + if [[ "$emusToInstall" == *"PPSSPP"* ]]; then doUpdatePPSSPP=true fi - if [[ "$emusToInstall" = *"Xemu"* ]]; then + if [[ "$emusToInstall" == *"Xemu"* ]]; then doUpdateXemu=true fi - if [[ "$emusToInstall" = *"ScummVM"* ]]; then + if [[ "$emusToInstall" == *"ScummVM"* ]]; then doUpdateScummVM=true fi - if [[ "$emusToInstall" = *"MelonDS"* ]]; then + if [[ "$emusToInstall" == *"MelonDS"* ]]; then doUpdateMelonDS=true fi - if [[ "$emusToInstall" = *"RMG"* ]]; then + if [[ "$emusToInstall" == *"RMG"* ]]; then doUpdateRMG=true fi ( progressInstalled="" - if [ "$doUpdateRA" = "true" ]; then + if [ "$doUpdateRA" == "true" ]; then echo "###Updating RetroArch..." (updateEmuFP "RetroArch" "org.libretro.RetroArch" || true) && let progresspct+=$pct && echo "%%%$progresspct" && progressInstalled+="|RetroArch" && echo "&&&$progressInstalled" fi - if [ "$doUpdatePrimeHack" = "true" ]; then + if [ "$doUpdatePrimeHack" == "true" ]; then echo "###Updating PrimeHack..." (updateEmuFP "PrimeHack" "io.github.shiiion.primehack" || true) && let progresspct+=$pct && echo "%%%$progresspct" && progressInstalled+="|PrimeHack" && echo "&&&$progressInstalled" fi - if [ "$doUpdateRPCS3" = "true" ]; then + if [ "$doUpdateRPCS3" == "true" ]; then echo "###Updating RPCS3..." (updateEmuFP "RPCS3" "net.rpcs3.RPCS3" || true) && let progresspct+=$pct && echo "%%%$progresspct" && progressInstalled+="|RPCS3" && echo "&&&$progressInstalled" fi - if [ "$doUpdateCitra" = "true" ]; then + if [ "$doUpdateCitra" == "true" ]; then echo "###Updating Citra..." (updateEmuFP "Citra" "org.citra_emu.citra" || true) && let progresspct+=$pct && echo "%%%$progresspct" && progressInstalled+="|Citra" && echo "&&&$progressInstalled" fi - if [ "$doUpdateDolphin" = "true" ]; then + if [ "$doUpdateDolphin" == "true" ]; then echo "###Updating Dolphin..." (updateEmuFP "dolphin-emu" "org.DolphinEmu.dolphin-emu" || true) && let progresspct+=$pct && echo "%%%$progresspct" && progressInstalled+="|Dolphin" && echo "&&&$progressInstalled" fi - if [ "$doUpdateDuck" = "true" ]; then + if [ "$doUpdateDuck" == "true" ]; then echo "###Updating DuckStation..." (updateEmuFP "DuckStation" "org.duckstation.DuckStation" || true) && let progresspct+=$pct && echo "%%%$progresspct" && progressInstalled+="|DuckStation" && echo "&&&$progressInstalled" fi - if [ "$doUpdatePPSSPP" = "true" ]; then + if [ "$doUpdatePPSSPP" == "true" ]; then echo "###Updating PPSSPP..." (updateEmuFP "PPSSPP" "org.ppsspp.PPSSPP" || true) && let progresspct+=$pct && echo "%%%$progresspct" && progressInstalled+="|PPSSPP" && echo "&&&$progressInstalled" fi - if [ "$doUpdateXemu" = "true" ]; then + if [ "$doUpdateXemu" == "true" ]; then echo "###Updating Xemu..." (updateEmuFP "Xemu-Emu" "app.xemu.xemu" || true) && let progresspct+=$pct && echo "%%%$progresspct" && progressInstalled+="|Xemu" && echo "&&&$progressInstalled" fi - if [ "$doUpdateScummVM" = "true" ]; then + if [ "$doUpdateScummVM" == "true" ]; then echo "###Updating ScummVM..." (updateEmuFP "ScummVM" "org.scummvm.ScummVM" || true) && let progresspct+=$pct && echo "%%%$progresspct" && progressInstalled+="|ScummVM" && echo "&&&$progressInstalled" fi - if [ "$doUpdateMelonDS" = "true" ]; then + if [ "$doUpdateMelonDS" == "true" ]; then echo "###Updating melonDS..." (updateEmuFP "melonDS" "net.kuribo64.melonDS" || true) && let progresspct+=$pct && echo "%%%$progresspct" && progressInstalled+="|melonDS" && echo "&&&$progressInstalled" fi - if [ "$doUpdateRMG" = "true" ]; then + if [ "$doUpdateRMG" == "true" ]; then echo "###Updating RMG..." (updateEmuFP "RMG" "com.github.Rosalie241.RMG" || true) && let progresspct+=$pct && echo "%%%$progresspct" && progressInstalled+="|RMG" && echo "&&&$progressInstalled" fi diff --git a/tools/launcherFunctions.sh b/tools/launcherFunctions.sh index 84fc23f2..1b94a245 100644 --- a/tools/launcherFunctions.sh +++ b/tools/launcherFunctions.sh @@ -9,13 +9,13 @@ reportError () { # Report error to logfile echo "${1}" >> "${LOGFILE}" # Open a Zenity dialog for the user - if [ "${2}" = "true" ]; then + if [ "${2}" == "true" ]; then zenity --error \ --text="${1}"\ --width=250 fi # Exit the script - if [ "${3}" = "true" ]; then + if [ "${3}" == "true" ]; then exit 1 fi } diff --git a/tools/launchers/cemu.sh b/tools/launchers/cemu.sh index f4e2ac56..91c3a640 100755 --- a/tools/launchers/cemu.sh +++ b/tools/launchers/cemu.sh @@ -6,12 +6,12 @@ cloud_sync_downloadEmu "Cemu" && cloud_sync_startService # Report Errors reportError () { echo "${1}" - if [ "${2}" = "true" ]; then + if [ "${2}" == "true" ]; then zenity --error \ --text="${1}" \ --width=250 fi - if [ "${3}" = "true" ]; then + if [ "${3}" == "true" ]; then exit 1 fi } @@ -77,7 +77,7 @@ main () { doProton="false" # Check for -W Flag override to windows version - if [ "$1" = "-w" ]; then + if [ "$1" == "-w" ]; then doProton="true" shift fi @@ -104,9 +104,9 @@ main () { showArguments "${@}" # Run Emulator - if [[ "${doProton}" = "false" ]]; then + if [[ "${doProton}" == "false" ]]; then #If doProton is false, check that EMUPATH was set correctly - if [[ "${EMUPATH}" = "false" ]] || [[ -z "${EMUPATH}" ]]; then + if [[ "${EMUPATH}" == "false" ]] || [[ -z "${EMUPATH}" ]]; then echo "Error: Unable to emulator path." reportError "Error: Unable to emulator path." "true" "true" fi @@ -182,7 +182,7 @@ main () { } # Only run if run directly -if [[ "${BASH_SOURCE[0]}" = "${0}" ]]; then +if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then # Set a LOGFILE to proton-launch.log in the same directory this script runs from # LogFile LOGFILE="$( dirname "${BASH_SOURCE[0]}" )/cemu-launch.log" diff --git a/tools/launchers/mgba.sh b/tools/launchers/mgba.sh index 17e0d26e..e204a207 100755 --- a/tools/launchers/mgba.sh +++ b/tools/launchers/mgba.sh @@ -8,7 +8,7 @@ emufolder="$HOME/Applications" # has to be applications for ES-DE to find it exe=$(find $emufolder -iname "${emuName}*.AppImage" | sort -n | cut -d' ' -f 2- | tail -n 1 2>/dev/null) #if appimage doesn't exist fall back to flatpak. -if [[ $exe = '' ]]; then +if [[ $exe == '' ]]; then #flatpak flatpakApp=$(flatpak list --app --columns=application | grep $emuName) exe="/usr/bin/flatpak run "$flatpakApp diff --git a/tools/launchers/pcsx2-qt.sh b/tools/launchers/pcsx2-qt.sh index c658ee42..3d2ef6ff 100755 --- a/tools/launchers/pcsx2-qt.sh +++ b/tools/launchers/pcsx2-qt.sh @@ -8,7 +8,7 @@ emufolder="$HOME/Applications" # has to be applications for ES-DE to find it exe=$(find $emufolder -iname "${emuName}*.AppImage" | sort -n | cut -d' ' -f 2- | tail -n 1 2>/dev/null) #if appimage doesn't exist fall back to flatpak. -if [[ $exe = '' ]]; then +if [[ $exe == '' ]]; then #flatpak flatpakApp=$(flatpak list --app --columns=application | grep $emuName) exe="/usr/bin/flatpak run "$flatpakApp diff --git a/tools/launchers/ryujinx.sh b/tools/launchers/ryujinx.sh index 160909d9..3c551409 100755 --- a/tools/launchers/ryujinx.sh +++ b/tools/launchers/ryujinx.sh @@ -8,7 +8,7 @@ emufolder="$HOME/Applications/publish" # has to be applications for ES-DE to fin exe=$(find $emufolder -iname "${emuName}" | sort -n | cut -d' ' -f 2- | tail -n 1 2>/dev/null) #if appimage doesn't exist fall back to flatpak. -if [[ $exe = '' ]]; then +if [[ $exe == '' ]]; then #flatpak flatpakApp=$(flatpak list --app --columns=application | grep $emuName) exe="/usr/bin/flatpak run "$flatpakApp diff --git a/tools/proton-launch.sh b/tools/proton-launch.sh index 5df32190..b4092e1f 100644 --- a/tools/proton-launch.sh +++ b/tools/proton-launch.sh @@ -7,13 +7,13 @@ reportError () { # Report error to logfile echo "${1}" >> "${LOGFILE}" # Open a Zenity dialog for the user - if [ "${2}" = "true" ]; then + if [ "${2}" == "true" ]; then zenity --error \ --text="${1}"\ --width=250 fi # Exit the script - if [ "${3}" = "true" ]; then + if [ "${3}" == "true" ]; then exit 1 fi } @@ -121,7 +121,7 @@ set_env () { fi # Set SteamAppId - if [ -z ${SteamAppId+x} ] || [ "${SteamAppId}" = 0 ]; then + if [ -z ${SteamAppId+x} ] || [ "${SteamAppId}" == 0 ]; then if [ -n "${APPID}" ]; then export SteamAppId="${APPID}" elif [ -z ${SteamAppId+x} ]; then @@ -219,7 +219,7 @@ main () { shift "$(( OPTIND - 1 ))" # Make sure there weren't any odd arguments in the options - if [[ "${*}" = *"--"* ]]; then + if [[ "${*}" == *"--"* ]]; then echo "Error: Invalid argument in options." >> "${LOGFILE}" exit 1 fi @@ -268,7 +268,7 @@ main () { } # Only run if run directly -if [[ "${BASH_SOURCE[0]}" = "${0}" ]]; then +if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then # Set a LOGFILE to proton-launch.log in the same directory this script runs from LOGFILE="$(dirname "${BASH_SOURCE[0]}")/proton-launch.log" echo "$(date +'%m/%d/%Y - %H:%M:%S') - Started" > "${LOGFILE}" diff --git a/tools/scrapers/launchbox.sh b/tools/scrapers/launchbox.sh index ecda2e78..a81df5fb 100644 --- a/tools/scrapers/launchbox.sh +++ b/tools/scrapers/launchbox.sh @@ -73,7 +73,7 @@ # # STR=$romNameNoExtensionTrimmed # SUB=', The' -# if [[ "$STR" = *"$SUB"* ]]; then +# if [[ "$STR" == *"$SUB"* ]]; then # # firstString=$romNameNoExtensionTrimmed # secondString="" @@ -88,7 +88,7 @@ # # romNameNoExtensionForLaunchbox=$(echo $romNameNoExtensionForLaunchbox | sed -r "s/,//g") # -# if [ $startcapture = true ]; then +# if [ $startcapture == true ]; then # # hasWheel=false # hasSs=false @@ -110,7 +110,7 @@ # fi # # #We only search games with no art -# if [ $hasWheel = false ] || [ $hasSs = false ] || [ $hasBox = false ]; then +# if [ $hasWheel == false ] || [ $hasSs == false ] || [ $hasBox == false ]; then # # content=$(cat ~/dragoonDoriseTools/pegasus-android-metadata/metadata.json) # @@ -126,7 +126,7 @@ # # if [[ $urlMediaWheel != null ]]; then # -# if [ $hasWheel = true ]; then +# if [ $hasWheel == true ]; then # echo -e "Image already exists, ${YELLOW}ignoring${NONE}" &> /dev/null # else # wget -q --show-progress "$urlMediaWheel" -O "$wheelSavePath" @@ -134,14 +134,14 @@ # # fi # if [[ $urlMediaSs != null ]]; then -# if [ $hasSs = true ]; then +# if [ $hasSs == true ]; then # echo -e "Image already exists, ${YELLOW}ignoring${NONE}" &> /dev/null # else # wget -q --show-progress "$urlMediaSs" -O "$ssSavePath" # fi # fi # if [[ $urlMediaBox != null ]]; then -# if [ $hasBox = true ]; then +# if [ $hasBox == true ]; then # echo -e "Image already exists, ${YELLOW}ignoring${NONE}" &> /dev/null # else # wget -q --show-progress "$urlMediaBox" -O "$box2dfrontSavePath" diff --git a/tools/scrapers/retroarch.sh b/tools/scrapers/retroarch.sh index a6b4aacb..f86acdf7 100644 --- a/tools/scrapers/retroarch.sh +++ b/tools/scrapers/retroarch.sh @@ -20,7 +20,7 @@ romParser_RA_download(){ echo -e "Image already exists, ${YELLOW}ignoring${NONE}" else status=$(wget --spider "http://thumbnails.libretro.com/$remoteSystem/$RA_folder/$romName.png" 2>&1) - if [[ $status = *"image/png"* ]] || [[ $status = *"image/jpeg"* ]] || [[ $status = *"image/jpg"* ]]; then + if [[ $status == *"image/png"* ]] || [[ $status == *"image/jpeg"* ]] || [[ $status == *"image/jpg"* ]]; then wget -q --show-progress "http://thumbnails.libretro.com/$remoteSystem/$RA_folder/$romName.png" -P "$romsPath/$system/media/$type/" | zenity --progress \ --title="EmuDeck RetroArch Parser" \ @@ -186,7 +186,7 @@ romParser_RA_start(){ do system=$(echo "$systemPath" | sed 's/.*\/\([^\/]*\)\/\?$/\1/') - if [[ "$systemPath" = *tx* ]]; then + if [[ "$systemPath" == *tx* ]]; then break fi diff --git a/tools/scrapers/screenscraper.sh b/tools/scrapers/screenscraper.sh index cc89cb61..fe77d342 100644 --- a/tools/scrapers/screenscraper.sh +++ b/tools/scrapers/screenscraper.sh @@ -47,19 +47,19 @@ romParser_SS_download(){ #ID Game content=$(curl $urlIDSS) #Don't check art if screenscraper is closed - if [[ $content = *"API closed"* ]]; then + if [[ $content == *"API closed"* ]]; then echo -e "The Screenscraper API is currently down, please try again later." exit fi #Don't check art after a failed curl request - if [[ $content = "" ]]; then + if [[ $content == "" ]]; then echo -e "Request failed to send for $romName, ${YELLOW}skipping${NONE}" echo "" echo "Request failed for $romName" exit fi #Don't check art if screenscraper can't find a match - if [[ $content = *"Erreur"* ]]; then + if [[ $content == *"Erreur"* ]]; then echo -e "Couldn't find a match for $romName, ${YELLOW}skipping${NONE}" echo "" echo "Couldn't find a match for $romName" @@ -78,7 +78,7 @@ romParser_SS_download(){ echo -e "${BOLD}Scraping: $media${NONE}" StatusString=$(wget --spider "$url" 2>&1) echo -ne "${BOLD}Searching World Region..." - if [[ $StatusString = *"image/png"* ]] || [[ $StatusString = *"image/jpeg"* ]] || [[ $StatusString = *"image/jpg"* ]]; then + if [[ $StatusString == *"image/png"* ]] || [[ $StatusString == *"image/jpeg"* ]] || [[ $StatusString == *"image/jpg"* ]]; then wget -q --show-progress "$url" -O "$urlSave" | zenity --progress \ --title="EmuDeck RetroArch Parser" \ @@ -93,7 +93,7 @@ romParser_SS_download(){ secondString="(us)" url="${firstString/(wor)/"$secondString"}" StatusString=$(wget --spider "$url" 2>&1) - if [[ $StatusString = *"image/png"* ]] || [[ $StatusString = *"image/jpeg"* ]] || [[ $StatusString = *"image/jpg"* ]]; then + if [[ $StatusString == *"image/png"* ]] || [[ $StatusString == *"image/jpeg"* ]] || [[ $StatusString == *"image/jpg"* ]]; then wget -q --show-progress "$url" -O "$urlSave" | zenity --progress \ --title="EmuDeck RetroArch Parser" \ @@ -108,7 +108,7 @@ romParser_SS_download(){ secondString="(eu)" url="${firstString/(us)/"$secondString"}" StatusString=$(wget --spider "$url" 2>&1) - if [[ $StatusString = *"image/png"* ]] || [[ $StatusString = *"image/jpeg"* ]] || [[ $StatusString = *"image/jpg"* ]]; then + if [[ $StatusString == *"image/png"* ]] || [[ $StatusString == *"image/jpeg"* ]] || [[ $StatusString == *"image/jpg"* ]]; then wget -q --show-progress "$url" -O "$urlSave" | zenity --progress \ --title="EmuDeck RetroArch Parser" \ @@ -124,7 +124,7 @@ romParser_SS_download(){ secondString="(usa)" url="${firstString/(eu)/"$secondString"}" StatusString=$(wget --spider "$url" 2>&1) - if [[ $StatusString = *"image/png"* ]] || [[ $StatusString = *"image/jpeg"* ]] || [[ $StatusString = *"image/jpg"* ]]; then + if [[ $StatusString == *"image/png"* ]] || [[ $StatusString == *"image/jpeg"* ]] || [[ $StatusString == *"image/jpg"* ]]; then wget -q --show-progress "$url" -O "$urlSave" | zenity --progress \ --title="EmuDeck RetroArch Parser" \ @@ -139,7 +139,7 @@ romParser_SS_download(){ secondString="(cus)" url="${firstString/(usa)/"$secondString"}" StatusString=$(wget --spider "$url" 2>&1) - if [[ $StatusString = *"image/png"* ]] || [[ $StatusString = *"image/jpeg"* ]] || [[ $StatusString = *"image/jpg"* ]]; then + if [[ $StatusString == *"image/png"* ]] || [[ $StatusString == *"image/jpeg"* ]] || [[ $StatusString == *"image/jpg"* ]]; then wget -q --show-progress "$url" -O "$urlSave" | zenity --progress \ --title="EmuDeck RetroArch Parser" \ @@ -154,7 +154,7 @@ romParser_SS_download(){ secondString="" url="${firstString/(cus)/"$secondString"}" StatusString=$(wget --spider "$url" 2>&1) - if [[ $StatusString = *"image/png"* ]] || [[ $StatusString = *"image/jpeg"* ]] || [[ $StatusString = *"image/jpg"* ]]; then + if [[ $StatusString == *"image/png"* ]] || [[ $StatusString == *"image/jpeg"* ]] || [[ $StatusString == *"image/jpg"* ]]; then wget -q --show-progress "$url" -O "$urlSave" &> /dev/null echo -e "${GREEN}Found it!${NONE}"| zenity --progress \ @@ -399,7 +399,7 @@ romParser_SS_start(){ for systemPath in $romsPath/*; do - if [[ "$systemPath" = *tx* ]]; then + if [[ "$systemPath" == *tx* ]]; then break fi diff --git a/uninstall.sh b/uninstall.sh index 72474e14..a5cc4790 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -52,7 +52,7 @@ fi clear -if [ "$doUninstall" = true ]; then +if [ "$doUninstall" == true ]; then text="`printf "If you would like to delete all your ROM shortcuts in Steam, click the Launch Steam ROM Manager button below.\n\nOnce Steam ROM Manager is launched, go to Settings and select Remove All added app entries\n\n Exit Steam ROM Manager and click Continue to proceed with uninstalling EmuDeck."`" @@ -111,70 +111,70 @@ if [ "$doUninstall" = true ]; then ans=$? if [ $ans -eq 0 ]; then - if [[ "$emusToUninstall" = *"ares"* ]]; then + if [[ "$emusToUninstall" == *"ares"* ]]; then doUninstallares=false fi - if [[ "$emusToUninstall" = *"Cemu"* ]]; then + if [[ "$emusToUninstall" == *"Cemu"* ]]; then doUninstallCemu=false fi - if [[ "${emusToUninstall}" = *"Cemu Native"* ]]; then + if [[ "${emusToUninstall}" == *"Cemu Native"* ]]; then doUninstallCemuNative="false" fi - if [[ "$emusToUninstall" = *"Citra"* ]]; then + if [[ "$emusToUninstall" == *"Citra"* ]]; then doUninstallCitra=false fi - if [[ "$emusToUninstall" = *"Dolphin"* ]]; then + if [[ "$emusToUninstall" == *"Dolphin"* ]]; then doUninstallDolphin=false fi - if [[ "$emusToUninstall" = *"Duckstation"* ]]; then + if [[ "$emusToUninstall" == *"Duckstation"* ]]; then doUninstallDuck=false fi - if [[ "$emusToUninstall" = *"Flycast"* ]]; then + if [[ "$emusToUninstall" == *"Flycast"* ]]; then doUninstallFlycast=false fi - if [[ "$emusToUninstall" = *"Mame"* ]]; then + if [[ "$emusToUninstall" == *"Mame"* ]]; then doUninstallMame=false fi - if [[ "$emusToUninstall" = *"melonDS"* ]]; then + if [[ "$emusToUninstall" == *"melonDS"* ]]; then doUninstallmelonDS=false fi - if [[ "$emusToUninstall" = *"mGBA"* ]]; then + if [[ "$emusToUninstall" == *"mGBA"* ]]; then doUninstallMGBA=false fi - if [[ "$emusToUninstall" = *"PrimeHack"* ]]; then + if [[ "$emusToUninstall" == *"PrimeHack"* ]]; then doUninstallPrimeHacks=false fi - if [[ "$emusToUninstall" = *"PCSX2"* ]]; then + if [[ "$emusToUninstall" == *"PCSX2"* ]]; then doUninstallPCSX2=false fi - if [[ "$emusToUninstall" = *"PPSSPP"* ]]; then + if [[ "$emusToUninstall" == *"PPSSPP"* ]]; then doUninstallPPSSPP=false fi - if [[ "$emusToUninstall" = *"RetroArch"* ]]; then + if [[ "$emusToUninstall" == *"RetroArch"* ]]; then doUninstallRA=false fi - if [[ "$emusToUninstall" = *"RPCS3"* ]]; then + if [[ "$emusToUninstall" == *"RPCS3"* ]]; then doUninstallRPCS3=false fi - if [[ "$emusToUninstall" = *"RMG"* ]]; then + if [[ "$emusToUninstall" == *"RMG"* ]]; then doUninstallRMG=false fi - if [[ "$emusToUninstall" = *"Ryujinx"* ]]; then + if [[ "$emusToUninstall" == *"Ryujinx"* ]]; then doUninstallRyujinx=false fi - if [[ "$emusToUninstall" = *"ScummVM"* ]]; then + if [[ "$emusToUninstall" == *"ScummVM"* ]]; then doUninstallScummVM=false fi - if [[ "$emusToUninstall" = *"Vita3K"* ]]; then + if [[ "$emusToUninstall" == *"Vita3K"* ]]; then doUninstallVita3K=false fi - if [[ "$emusToUninstall" = *"Yuzu"* ]]; then + if [[ "$emusToUninstall" == *"Yuzu"* ]]; then doUninstallYuzu=false fi - if [[ "$emusToUninstall" = *"Xemu"* ]]; then + if [[ "$emusToUninstall" == *"Xemu"* ]]; then doUninstallXemu=false fi - if [[ "$emusToUninstall" = *"Xenia"* ]]; then + if [[ "$emusToUninstall" == *"Xenia"* ]]; then doUninstallXenia=false fi @@ -189,73 +189,73 @@ if [ "$doUninstall" = true ]; then echo "10" echo "# Removing selected Emulators" ; - if [[ "$doUninstallares" = true ]]; then + if [[ "$doUninstallares" == true ]]; then flatpak uninstall dev.ares.ares -y rm -rf $HOME/.var/app/dev.ares.ares &>> /dev/null fi - if [[ "$doUninstallCemu" = true ]]; then + if [[ "$doUninstallCemu" == true ]]; then find ${romsPath}/wiiu -mindepth 1 -name roms -prune -o -exec rm -rf '{}' \; rm -f "$HOME/.local/share/applications/Cemu (Proton).desktop" &>> /dev/null fi - if [[ "${doUninstallCemuNative}" = "true" ]]; then + if [[ "${doUninstallCemuNative}" == "true" ]]; then rm -rf $HOME/Applications/Cemu*.AppImage &>> /dev/null rm -rf $HOME/.config/Cemu &>> /dev/null rm -rf $HOME/.local/share/Cemu &>> /dev/null rm -rf $HOME/.cache/Cemu &>> /dev/null rm -rf $HOME/.local/share/applications/Cemu.desktop &>> /dev/null fi - if [[ "$doUninstallCitra" = true ]]; then + if [[ "$doUninstallCitra" == true ]]; then flatpak uninstall org.citra_emu.citra -y rm -rf $HOME/.var/app/org.citra_emu.citra &>> /dev/null fi - if [[ "$doUninstallDolphin" = true ]]; then + if [[ "$doUninstallDolphin" == true ]]; then flatpak uninstall org.DolphinEmu.dolphin-emu -y rm -rf $HOME/.var/app/org.DolphinEmu.dolphin-emu &>> /dev/null fi - if [[ "$doUninstallDuck" = true ]]; then + if [[ "$doUninstallDuck" == true ]]; then flatpak uninstall org.duckstation.DuckStation -y rm -rf $HOME/.var/app/org.duckstation.DuckStation &>> /dev/null fi - if [[ "$doUninstallFlycast" = true ]]; then + if [[ "$doUninstallFlycast" == true ]]; then flatpak uninstall org.flycast.Flycast -y rm -rf $HOME/.var/app/org.flycast.Flycast &>> /dev/null fi - if [[ "$doUninstallMame" = true ]]; then + if [[ "$doUninstallMame" == true ]]; then flatpak uninstall org.mamedev.MAME -y rm -rf $HOME/.var/app/org.mamedev.MAME &>> /dev/null fi - if [[ "$doUninstallmelonDS" = true ]]; then + if [[ "$doUninstallmelonDS" == true ]]; then flatpak uninstall net.kuribo64.melonDS -y rm -rf $HOME/.var/app/net.kuribo64.melonDS &>> /dev/null fi - if [[ "$doUninstallMGBA" = true ]]; then + if [[ "$doUninstallMGBA" == true ]]; then rm -rf $HOME/Applications/mGBA.AppImage &>> /dev/null rm -rf $HOME/.config/mgba &>> /dev/null rm -rf $HOME/.local/share/applications/mGBA.desktop &>> /dev/null fi - if [[ "$doUninstallPCSX2" = true ]]; then + if [[ "$doUninstallPCSX2" == true ]]; then rm -rf $HOME/Applications/pcsx2-Qt.AppImage &>> /dev/null rm -rf $HOME/.config/PCSX2 &>> /dev/null rm -rf $HOME/.local/share/applications/pcsx2-Qt.desktop &>> /dev/null rm -rf $HOME/.local/share/applications/PCSX2-Qt.desktop &>> /dev/null fi - if [[ "$doUninstallPPSSPP" = true ]]; then + if [[ "$doUninstallPPSSPP" == true ]]; then flatpak uninstall org.ppsspp.PPSSPP -y rm -rf $HOME/.var/app/org.ppsspp.PPSSPP &>> /dev/null fi - if [[ "$doUninstallPrimeHacks" = true ]]; then + if [[ "$doUninstallPrimeHacks" == true ]]; then flatpak uninstall io.github.shiiion.primehack -y rm -rf $HOME/.var/app/io.github.shiiion.primehack &>> /dev/null fi - if [[ "$doUninstallRA" = true ]]; then + if [[ "$doUninstallRA" == true ]]; then flatpak uninstall org.libretro.RetroArch -y rm -rf $HOME/.var/app/org.libretro.RetroArch &>> /dev/null fi - if [[ "$doUninstallRMG" = true ]]; then + if [[ "$doUninstallRMG" == true ]]; then flatpak uninstall com.github.Rosalie241.RMG -y rm -rf $HOME/.var/app/com.github.Rosalie241.RMG &>> /dev/null fi - if [[ "$doUninstallRPCS3" = true ]]; then + if [[ "$doUninstallRPCS3" == true ]]; then # Flatpak flatpak uninstall net.rpcs3.RPCS3 -y rm -rf $HOME/.var/app/net.rpcs3.RPCS3 &>> /dev/null @@ -264,29 +264,29 @@ if [ "$doUninstall" = true ]; then rm -rf "$HOME/.cache/rpcs3" &>> /dev/null rm -rf $HOME/.local/share/applications/RPCS3.desktop &>> /dev/null fi - if [[ "$doUninstallRyujinx" = true ]]; then + if [[ "$doUninstallRyujinx" == true ]]; then rm -rf $HOME/.config/Ryujinx &>> /dev/null rm -rf $HOME/Applications/publish &>> /dev/null rm -rf $HOME/.local/share/applications/Ryujinx.desktop &>> /dev/null fi - if [[ "$doUninstallScummVM" = true ]]; then + if [[ "$doUninstallScummVM" == true ]]; then flatpak uninstall org.scummvm.ScummVM -y rm -rf $HOME/.var/app/org.scummvm.ScummVM &>> /dev/null fi - if [[ "$doUninstallVita3K" = true ]]; then + if [[ "$doUninstallVita3K" == true ]]; then rm -rf $HOME/Applications/Vita3K &>> /dev/null rm -rf $HOME/.local/share/Vita3K &>> /dev/null rm -rf $HOME/.local/share/applications/Vita3K.desktop &>> /dev/null fi - if [[ "$doUninstallXemu" = true ]]; then + if [[ "$doUninstallXemu" == true ]]; then flatpak uninstall app.xemu.xemu -y rm -rf $HOME/.var/app/app.xemu.xemu &>> /dev/null fi - if [[ "$doUninstallXenia" = true ]]; then + if [[ "$doUninstallXenia" == true ]]; then find ${romsPath}/xbox360 -mindepth 1 -name roms -prune -o -exec rm -rf '{}' \; &>> /dev/null rm -rf $HOME/.local/share/applications/xenia.desktop &>> /dev/null fi - if [[ "$doUninstallYuzu" = true ]]; then + if [[ "$doUninstallYuzu" == true ]]; then #flatpak uninstall org.yuzu_emu.yuzu --system -y #rm -rf $HOME/.var/app/org.yuzu_emu.yuzu &>> /dev/null rm -rf $HOME/Applications/yuzu.AppImage &>> /dev/null diff --git a/whiptail/AspectRatio3DPage.sh b/whiptail/AspectRatio3DPage.sh index 54d21e2e..95260847 100644 --- a/whiptail/AspectRatio3DPage.sh +++ b/whiptail/AspectRatio3DPage.sh @@ -12,7 +12,7 @@ while true; do esac done -if [ $question = 43 ]; then +if [ $question == 43 ]; then setSetting arClassic3D 43 else setSetting arClassic3D 169 diff --git a/whiptail/AspectRatioDolphinPage.sh b/whiptail/AspectRatioDolphinPage.sh index 02718579..87d8421c 100644 --- a/whiptail/AspectRatioDolphinPage.sh +++ b/whiptail/AspectRatioDolphinPage.sh @@ -12,7 +12,7 @@ while true; do esac done -if [ $question = 43 ]; then +if [ $question == 43 ]; then setSetting arDolphin 43 else setSetting arDolphin 169 diff --git a/whiptail/AspectRatioSegaPage.sh b/whiptail/AspectRatioSegaPage.sh index 76c76901..24608d4f 100644 --- a/whiptail/AspectRatioSegaPage.sh +++ b/whiptail/AspectRatioSegaPage.sh @@ -12,7 +12,7 @@ while true; do esac done -if [ $question = 43 ]; then +if [ $question == 43 ]; then setSetting arSega 43 else setSetting arSega 32 diff --git a/whiptail/CHDToolPage.sh b/whiptail/CHDToolPage.sh index 8eba555f..a0d568dd 100644 --- a/whiptail/CHDToolPage.sh +++ b/whiptail/CHDToolPage.sh @@ -12,7 +12,7 @@ while true; do esac done -if [ $question = 'EASY' ]; then +if [ $question == 'EASY' ]; then setSetting expert false else setSetting expert true diff --git a/whiptail/ChangeLogPage.sh b/whiptail/ChangeLogPage.sh index 8eba555f..a0d568dd 100644 --- a/whiptail/ChangeLogPage.sh +++ b/whiptail/ChangeLogPage.sh @@ -12,7 +12,7 @@ while true; do esac done -if [ $question = 'EASY' ]; then +if [ $question == 'EASY' ]; then setSetting expert false else setSetting expert true diff --git a/whiptail/CheckBiosPage.sh b/whiptail/CheckBiosPage.sh index 8eba555f..a0d568dd 100644 --- a/whiptail/CheckBiosPage.sh +++ b/whiptail/CheckBiosPage.sh @@ -12,7 +12,7 @@ while true; do esac done -if [ $question = 'EASY' ]; then +if [ $question == 'EASY' ]; then setSetting expert false else setSetting expert true diff --git a/whiptail/EmuGuidePage.sh b/whiptail/EmuGuidePage.sh index 8eba555f..a0d568dd 100644 --- a/whiptail/EmuGuidePage.sh +++ b/whiptail/EmuGuidePage.sh @@ -12,7 +12,7 @@ while true; do esac done -if [ $question = 'EASY' ]; then +if [ $question == 'EASY' ]; then setSetting expert false else setSetting expert true diff --git a/whiptail/EmulatorSelectorPage.sh b/whiptail/EmulatorSelectorPage.sh index 36b1e00e..e913bd8f 100644 --- a/whiptail/EmulatorSelectorPage.sh +++ b/whiptail/EmulatorSelectorPage.sh @@ -75,25 +75,25 @@ mapfile -t settingsEmus <<< $emulators for settingsEmu in "${settingsEmus[@]}"; do - if [[ $settingsEmu = *"RA"* ]]; then + if [[ $settingsEmu == *"RA"* ]]; then setSetting doInstallRA true fi - if [[ $settingsEmu = *"DOLPHIN"* ]]; then + if [[ $settingsEmu == *"DOLPHIN"* ]]; then setSetting doInstallDolphin true fi - if [[ $settingsEmu = *"DUCK"* ]]; then + if [[ $settingsEmu == *"DUCK"* ]]; then setSetting doInstallDuck true fi - if [[ $settingsEmu = *"AETHERSX2"* ]]; then + if [[ $settingsEmu == *"AETHERSX2"* ]]; then setSetting doInstallPCSX2 true fi - if [[ $settingsEmu = *"CITRA"* ]]; then + if [[ $settingsEmu == *"CITRA"* ]]; then setSetting doInstallCitra true fi - if [[ $settingsEmu = *"PPSSPP"* ]]; then + if [[ $settingsEmu == *"PPSSPP"* ]]; then setSetting doInstallPPSSPP true fi - if [[ $settingsEmu = *"SKYLINE"* ]]; then + if [[ $settingsEmu == *"SKYLINE"* ]]; then setSetting doInstallSkyline true fi done \ No newline at end of file diff --git a/whiptail/EndPage.sh b/whiptail/EndPage.sh index 8dd9224e..014b9903 100644 --- a/whiptail/EndPage.sh +++ b/whiptail/EndPage.sh @@ -20,7 +20,7 @@ echo "" echo -e "${BOLD}- How to add games${NONE}" -if [ $romPath = 'SDCARD' ]; then +if [ $romPath == 'SDCARD' ]; then echo -e "You need to manually move your roms folder before starting" echo -e "Open any File manager app and move the ${GREEN}/Emulation${NONE} folder to your SD Card root" echo -e "Now, connect your device to a computer and copy your roms to the proper folders ( each system has its own subfolder )" @@ -32,14 +32,14 @@ fi echo "" echo -e "${BOLD}- How to launch your games${NONE}" #Easy -if [ $expert = false ]; then +if [ $expert == false ]; then echo -e "We've installed for you Daijisho so you can use it as a frontend for all your systems" echo -e "You need to Open Daijisho From your apps and manually configure it with your custom paths" echo "" echo -e "First, open Daijisho and select the Systems you want to use by clicking on the Download Platforms button" echo -e "Now click on Paths, Add more" echo -e "Select the system folder ( ie: Super Nintendo )" - if [ $romPath = 'SDCARD' ]; then + if [ $romPath == 'SDCARD' ]; then if [ $android -gt 10 ]; then echo -e "SD Card: ${GREEN}Emulation/roms/snes${NONE}" else @@ -67,11 +67,11 @@ if [ $android -lt 11 ] && [ $romPath != 'INTERNAL' ]; then echo -e "Be aware that if you delete the Termux app Android will ${RED}DELETE${NONE} the Termux folder on your SD Card including your roms" fi -if [ $doInstallPegasus = true ]; then +if [ $doInstallPegasus == true ]; then echo "" echo -e "${RED}Pegasus Warning${NONE}" if [ $android -gt 10 ]; then - if [ $romPath = 'SDCARD' ]; then + if [ $romPath == 'SDCARD' ]; then echo -e "The Pegasus Artwork Scrapper only works on if you keep your roms on your Internal Storage" echo -e "So you'll also need to connect your device on your computer to get your Artwork" echo -e "We recommend using www.skraper.net" diff --git a/whiptail/ErrorPage.sh b/whiptail/ErrorPage.sh index 8eba555f..a0d568dd 100644 --- a/whiptail/ErrorPage.sh +++ b/whiptail/ErrorPage.sh @@ -12,7 +12,7 @@ while true; do esac done -if [ $question = 'EASY' ]; then +if [ $question == 'EASY' ]; then setSetting expert false else setSetting expert true diff --git a/whiptail/PegasusInstallPage.sh b/whiptail/PegasusInstallPage.sh index 6cc20b77..c90dced3 100644 --- a/whiptail/PegasusInstallPage.sh +++ b/whiptail/PegasusInstallPage.sh @@ -24,22 +24,22 @@ if [ $android -gt 10 ]; then for settingsFrontend in "${settingsFrontends[@]}"; do - if [[ $settingsFrontend = *"PEGASUS"* ]]; then + if [[ $settingsFrontend == *"PEGASUS"* ]]; then setSetting doInstallPegasus true fi - if [[ $settingsFrontend = *"DAIJISHO"* ]]; then + if [[ $settingsFrontend == *"DAIJISHO"* ]]; then setSetting doInstallDaijisho true fi - if [[ $settingsFrontend = *"DIG"* ]]; then + if [[ $settingsFrontend == *"DIG"* ]]; then setSetting doInstallDig true fi - if [[ $settingsFrontend = *"LAUNCHBOX"* ]]; then + if [[ $settingsFrontend == *"LAUNCHBOX"* ]]; then setSetting doInstallLaunchbox true fi - if [[ $settingsFrontend = *"RESET"* ]]; then + if [[ $settingsFrontend == *"RESET"* ]]; then setSetting doInstallReset true fi - if [[ $settingsFrontend = *"ARC"* ]]; then + if [[ $settingsFrontend == *"ARC"* ]]; then setSetting doInstallArc true fi done diff --git a/whiptail/PegasusThemePage.sh b/whiptail/PegasusThemePage.sh index 265ba8b5..50269a54 100644 --- a/whiptail/PegasusThemePage.sh +++ b/whiptail/PegasusThemePage.sh @@ -12,19 +12,19 @@ # # for theme in ${themes[@]}; # do -# if [[ $theme = *"EPIC"* ]]; then +# if [[ $theme == *"EPIC"* ]]; then # setSetting doInstallThemeEpic true # fi -# if [[ $theme = *"SWITCH"* ]]; then +# if [[ $theme == *"SWITCH"* ]]; then # setSetting doInstallThemeSwitch true # fi -# if [[ $theme = *"MEGA"* ]]; then +# if [[ $theme == *"MEGA"* ]]; then # setSetting doInstallThemeMega true # fi -# if [[ $theme = *"GAMEOS"* ]]; then +# if [[ $theme == *"GAMEOS"* ]]; then # setSetting doInstallThemeGameOS true # fi -# if [[ $theme = *"NEORETRO"* ]]; then +# if [[ $theme == *"NEORETRO"* ]]; then # setSetting doInstallThemeNeoRetro true # fi # done \ No newline at end of file diff --git a/whiptail/RABezelsPage.sh b/whiptail/RABezelsPage.sh index eeea3691..16f8d958 100644 --- a/whiptail/RABezelsPage.sh +++ b/whiptail/RABezelsPage.sh @@ -1,6 +1,6 @@ #!/bin/bash -if [ $deviceAR = 169 ] || [ $deviceAR = 53 ]; then +if [ $deviceAR == 169 ] || [ $deviceAR == 53 ]; then while true; do question=$(whiptail --title "Game Bezels" \ --radiolist "You can use our preconfigured bezels to hide the vertical black vars on 8bit and 16bits games" 10 80 4 \ @@ -14,7 +14,7 @@ if [ $deviceAR = 169 ] || [ $deviceAR = 53 ]; then esac done - if [ $question = 'YES' ]; then + if [ $question == 'YES' ]; then setSetting RABezels true else setSetting RABezels false diff --git a/whiptail/RAConfigPage.sh b/whiptail/RAConfigPage.sh index 8eba555f..a0d568dd 100644 --- a/whiptail/RAConfigPage.sh +++ b/whiptail/RAConfigPage.sh @@ -12,7 +12,7 @@ while true; do esac done -if [ $question = 'EASY' ]; then +if [ $question == 'EASY' ]; then setSetting expert false else setSetting expert true diff --git a/whiptail/ResetPage.sh b/whiptail/ResetPage.sh index 8eba555f..a0d568dd 100644 --- a/whiptail/ResetPage.sh +++ b/whiptail/ResetPage.sh @@ -12,7 +12,7 @@ while true; do esac done -if [ $question = 'EASY' ]; then +if [ $question == 'EASY' ]; then setSetting expert false else setSetting expert true diff --git a/whiptail/RomStoragePage.sh b/whiptail/RomStoragePage.sh index fa0ea653..eb4075c3 100644 --- a/whiptail/RomStoragePage.sh +++ b/whiptail/RomStoragePage.sh @@ -1,7 +1,7 @@ #!/bin/bash - if [ $hasSDCARD = true ]; then + if [ $hasSDCARD == true ]; then while true; do romPathSelection=$(whiptail --title "Choose your Storage" \ @@ -19,7 +19,7 @@ setSetting romPath $romPathSelection - if [ $romPath = 'INTERNAL' ]; then + if [ $romPath == 'INTERNAL' ]; then path="$HOME/storage/shared" else SDPath=$(readlink ~/storage/external-1) diff --git a/whiptail/SettingsPage.sh b/whiptail/SettingsPage.sh index 8eba555f..a0d568dd 100644 --- a/whiptail/SettingsPage.sh +++ b/whiptail/SettingsPage.sh @@ -12,7 +12,7 @@ while true; do esac done -if [ $question = 'EASY' ]; then +if [ $question == 'EASY' ]; then setSetting expert false else setSetting expert true diff --git a/whiptail/Shaders2DPage.sh b/whiptail/Shaders2DPage.sh index 7a341cc0..a0e7b2ec 100644 --- a/whiptail/Shaders2DPage.sh +++ b/whiptail/Shaders2DPage.sh @@ -12,7 +12,7 @@ while true; do esac done -if [ $question = 'ON' ]; then +if [ $question == 'ON' ]; then setSetting RAHandClassic2D true else setSetting RAHandClassic2D false diff --git a/whiptail/ShadersHandheldsPage.sh b/whiptail/ShadersHandheldsPage.sh index 867f6d88..555b5098 100644 --- a/whiptail/ShadersHandheldsPage.sh +++ b/whiptail/ShadersHandheldsPage.sh @@ -12,7 +12,7 @@ while true; do esac done -if [ $question = 'ON' ]; then +if [ $question == 'ON' ]; then setSetting RAHandHeldShader true else setSetting RAHandHeldShader false diff --git a/whiptail/UninstallPage.sh b/whiptail/UninstallPage.sh index 8eba555f..a0d568dd 100644 --- a/whiptail/UninstallPage.sh +++ b/whiptail/UninstallPage.sh @@ -12,7 +12,7 @@ while true; do esac done -if [ $question = 'EASY' ]; then +if [ $question == 'EASY' ]; then setSetting expert false else setSetting expert true diff --git a/whiptail/UpdateEmusPage.sh b/whiptail/UpdateEmusPage.sh index 151b5956..e5685f25 100644 --- a/whiptail/UpdateEmusPage.sh +++ b/whiptail/UpdateEmusPage.sh @@ -12,7 +12,7 @@ while true; do esac done -if [ $question = 'EASY' ]; then +if [ $question == 'EASY' ]; then setSetting expert false else setSetting expert true diff --git a/whiptail/WelcomePage.sh b/whiptail/WelcomePage.sh index 60afb05e..08291da3 100644 --- a/whiptail/WelcomePage.sh +++ b/whiptail/WelcomePage.sh @@ -12,7 +12,7 @@ while true; do esac done -if [ $question = 'EASY' ]; then +if [ $question == 'EASY' ]; then setSetting expert false else setSetting expert true