upgpkg: discord-electron-openasar 0.0.39+824-3: fix launcher

* Fix launcher error if config variable not set but rizin is installed
This commit is contained in:
Manuel 2024-01-04 22:47:50 +01:00
parent 92981e8b1f
commit f51b16e9a6
Signed by: Manuel
GPG key ID: 4085037435E1F07A
3 changed files with 7 additions and 7 deletions

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash
set -euo pipefail
set -eo pipefail
declare -a flags
@ -19,9 +19,9 @@ if hash rizin &> /dev/null && [[ "${PATCH_KRISP}" == true ]]; then
fi
fi
if [[ -w "${flags_file}" ]]; then
if [[ -r "${flags_file}" ]]; then
# Replacing because old flag does not work
if grep -q '\--ignore-gpu-blacklist' "${flags_file}"; then
if [[ -w "${flags_file}" ]] && grep -q '\--ignore-gpu-blacklist' "${flags_file}"; then
sed -i "s|--ignore-gpu-blacklist|--ignore-gpu-blocklist|" "${flags_file}"
fi
mapfile -t < "${flags_file}"