upgpkg: discord-electron-openasar 0.0.27+809-4

Update launch script to not touch the flags file with sed on no match
This commit is contained in:
Manuel 2023-05-28 23:55:52 +02:00
parent bcc3abeedf
commit d9855ab9b1
Signed by: Manuel
GPG key ID: 4085037435E1F07A
3 changed files with 6 additions and 5 deletions

View file

@ -7,7 +7,8 @@ flags_file="${XDG_CONFIG_HOME:-$HOME/.config}/@PKGNAME@-flags.conf"
declare -a flags
if [[ -f "${flags_file}" ]]; then
sed -i "s|--ignore-gpu-blacklist|--ignore-gpu-blocklist|" "${flags_file}"
grep -q '\--ignore-gpu-blacklist' "${flags_file}" && \
sed -i "s|--ignore-gpu-blacklist|--ignore-gpu-blocklist|" "${flags_file}"
mapfile -t < "${flags_file}"
else
cat > "${flags_file}" <<EOF