EmuDeck/functions/updateEmuFP.sh
SilentException e183570525 Fixed flatpak launchers update
Fixed flatpak launcher scripts update path (missing slash) - No such file or directory errors in log
2023-01-21 23:09:15 +01:00

20 lines
519 B
Bash

#!/bin/bash
updateEmuFP(){
name=$1
ID=$2
setMSG "Updating $name"
flatpak update $ID -y --system
flatpak override $ID --filesystem=host --user
flatpak override $ID --share=network --user
shName=$(echo "$name" | awk '{print tolower($0)}')
find "${toolsPath}"/launchers/ -type f -iname $shName.sh | while read f; do echo "deleting $f"; rm -f "$f"; done;
cp "${EMUDECKGIT}"/tools/launchers/"${shName}".sh "${toolsPath}"/launchers/"${shName}".sh
chmod +x "${toolsPath}"/launchers/"${shName}".sh
}