[arch-commits] Commit in electron/trunk (PKGBUILD electron-launcher.sh)
Nicola Squartini
tensor5 at archlinux.org
Tue Mar 9 13:15:03 UTC 2021
Date: Tuesday, March 9, 2021 @ 13:15:02
Author: tensor5
Revision: 887021
upgpkg: electron 12.0.0-2
Use custom launcher to read command line flags from file.
Added:
electron/trunk/electron-launcher.sh
Modified:
electron/trunk/PKGBUILD
----------------------+
PKGBUILD | 8 +++++---
electron-launcher.sh | 17 +++++++++++++++++
2 files changed, 22 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2021-03-09 13:14:18 UTC (rev 887020)
+++ PKGBUILD 2021-03-09 13:15:02 UTC (rev 887021)
@@ -4,7 +4,7 @@
pkgver=12.0.0
_commit=3ae63c9a06a4b5c9074572ee8b7137520fe4ba4e
_chromiumver=89.0.4389.69
-pkgrel=1
+pkgrel=2
pkgdesc='Build cross platform desktop apps with web technologies'
arch=('x86_64')
url='https://electronjs.org/'
@@ -20,6 +20,7 @@
"xdg-utils: open URLs with desktop's default (xdg-email, xdg-open)")
source=('git+https://github.com/electron/electron.git'
'git+https://chromium.googlesource.com/chromium/tools/depot_tools.git'
+ "${pkgname}-launcher.sh"
"${pkgname}.desktop"
'default_app-icon.patch'
'use-system-libraries-in-node.patch'
@@ -31,6 +32,7 @@
)
sha256sums=('SKIP'
'SKIP'
+ 'a62a5c29aac971f14fe76ebaaf6e573391716e231c98a46b95916976b4d17535'
'5270db01f3f8aaa5137dec275a02caa832b7f2e37942e068cba8d28b3a29df39'
'dd2d248831dd4944d385ebf008426e66efe61d6fdf66f8932c963a12167947b4'
'f16103daf05713dea632b5f01e45db20ff12d1770a6539b4e8d3957a0242dd54'
@@ -200,8 +202,8 @@
"${pkgdir}/usr/share/licenses/${pkgname}"
done
- install -dm755 "${pkgdir}"/usr/bin
- ln -s "../lib/${pkgname}/electron" "${pkgdir}/usr/bin/${pkgname}"
+ install -Dm755 "${srcdir}/${pkgname}-launcher.sh" \
+ "${pkgdir}/usr/bin/${pkgname}"
# Install .desktop and icon file (see default_app-icon.patch)
install -Dm644 -t "${pkgdir}/usr/share/applications" "${pkgname}.desktop"
Added: electron-launcher.sh
===================================================================
--- electron-launcher.sh (rev 0)
+++ electron-launcher.sh 2021-03-09 13:15:02 UTC (rev 887021)
@@ -0,0 +1,17 @@
+#!/usr/bin/bash
+
+flags_file="${XDG_CONFIG_HOME:-$HOME/.config}/electron-flags.conf"
+
+declare -a flags
+
+if [[ -f "${flags_file}" ]]; then
+ mapfile -t < "${flags_file}"
+fi
+
+for line in "${MAPFILE[@]}"; do
+ if [[ ! "${line}" =~ ^[[:space:]]*#.* ]]; then
+ flags+=("${line}")
+ fi
+done
+
+exec /usr/lib/electron/electron "${flags[@]}"
More information about the arch-commits
mailing list