From bcc3abeedffe792c9e5701a9a1c4695e19936b66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20H=C3=BCsers?= Date: Sun, 28 May 2023 23:55:25 +0200 Subject: [PATCH] upgpkg: discord-electron 0.0.27-4 Update launch script to not touch the flags file with sed on no match --- discord-electron/.SRCINFO | 4 ++-- discord-electron/PKGBUILD | 4 ++-- discord-electron/discord-launcher.sh | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/discord-electron/.SRCINFO b/discord-electron/.SRCINFO index 09b64df..734d978 100644 --- a/discord-electron/.SRCINFO +++ b/discord-electron/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = discord-electron pkgdesc = Discord using system provided electron (v22) for increased security and performance pkgver = 0.0.27 - pkgrel = 3 + pkgrel = 4 url = https://discord.com install = discord-electron.install arch = x86_64 @@ -19,6 +19,6 @@ pkgbase = discord-electron source = https://dl.discordapp.net/apps/linux/0.0.27/discord-0.0.27.tar.gz source = discord-launcher.sh sha512sums = 285a0119b4740402a3fa94d3679a52bc8d883413ee32187e90087960a4d34aaf316788d2708bbccafe3f995c2b99767b45bc4b7c731704ef887a8de1b3d3926f - sha512sums = ad2c16b6fc539f4315755df10c969822a38879558badfbd2ff9bf53558e755a7b215ce7415e35d7f294539a971ebc5c283f9293b79891893d5f28cd441ca6279 + sha512sums = 6337d1f40c9ac97f180862ed0bcf1ec6fb6d4ecf3cb215369550768a4a3600a9546c43f467855a77e95b0f314348a833de40f4284b5b8924d101b4a456b073f5 pkgname = discord-electron diff --git a/discord-electron/PKGBUILD b/discord-electron/PKGBUILD index 217c477..7cbd556 100644 --- a/discord-electron/PKGBUILD +++ b/discord-electron/PKGBUILD @@ -15,7 +15,7 @@ pkgname=discord-electron _pkgname=discord _electron=22 pkgver=0.0.27 -pkgrel=3 +pkgrel=4 pkgdesc="Discord using system provided electron (v${_electron}) for increased security and performance" arch=('x86_64') provides=("${_pkgname}") @@ -33,7 +33,7 @@ optdepends=( source=("https://dl.discordapp.net/apps/linux/${pkgver}/discord-${pkgver}.tar.gz" 'discord-launcher.sh') sha512sums=('285a0119b4740402a3fa94d3679a52bc8d883413ee32187e90087960a4d34aaf316788d2708bbccafe3f995c2b99767b45bc4b7c731704ef887a8de1b3d3926f' - 'ad2c16b6fc539f4315755df10c969822a38879558badfbd2ff9bf53558e755a7b215ce7415e35d7f294539a971ebc5c283f9293b79891893d5f28cd441ca6279') + '6337d1f40c9ac97f180862ed0bcf1ec6fb6d4ecf3cb215369550768a4a3600a9546c43f467855a77e95b0f314348a833de40f4284b5b8924d101b4a456b073f5') prepare() { # prepare launcher and install script diff --git a/discord-electron/discord-launcher.sh b/discord-electron/discord-launcher.sh index 492dac7..42e6f82 100644 --- a/discord-electron/discord-launcher.sh +++ b/discord-electron/discord-launcher.sh @@ -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}" <