diff options
author | zxp19821005 | 2024-05-29 10:59:59 +0800 |
---|---|---|
committer | zxp19821005 | 2024-05-29 10:59:59 +0800 |
commit | 4ebdf0bfdcc88e68b9ea1bd654427c75a95bd73f (patch) | |
tree | 13288b82c12df17b29cf17314e5a863991ce96bd | |
parent | 9849378136dfc19763505f413b13928f006d493f (diff) | |
download | aur-4ebdf0bfdcc88e68b9ea1bd654427c75a95bd73f.tar.gz |
fix errors
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | PKGBUILD | 8 | ||||
-rw-r--r-- | youtube-smarttv-emu.sh | 25 |
3 files changed, 27 insertions, 13 deletions
@@ -1,12 +1,11 @@ pkgbase = youtube-smarttv-emu-bin pkgdesc = A cross platform app built with Electron that opens an instance of the Smart TV version of Youtube. pkgver = 1.0.1 - pkgrel = 8 + pkgrel = 9 url = https://github.com/platevoltage/youtube-smarttv-emu arch = x86_64 license = MIT - depends = electron21-bin - depends = hicolor-icon-theme + depends = electron21 provides = youtube-smarttv-emu=1.0.1 conflicts = youtube-smarttv-emu source = youtube-smarttv-emu-1.0.1.deb::https://github.com/platevoltage/youtube-smarttv-emu/releases/download/v1.0.1/youtube-smarttv-emu_1.0.1_amd64.deb @@ -14,6 +13,6 @@ pkgbase = youtube-smarttv-emu-bin source = youtube-smarttv-emu.sh sha256sums = 83ba642af297fccc57f6017f32825b0cb523ed35f257905430b7b7cc14400aeb sha256sums = 2c7bd4372f284a7f952702e50d98d0ef6c5fbb1d1792f9d6d54862cd5fc03860 - sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8 + sha256sums = 2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051 pkgname = youtube-smarttv-emu-bin @@ -2,14 +2,13 @@ pkgname=youtube-smarttv-emu-bin pkgver=1.0.1 _electronversion=21 -pkgrel=8 +pkgrel=9 pkgdesc="A cross platform app built with Electron that opens an instance of the Smart TV version of Youtube." arch=('x86_64') url="https://github.com/platevoltage/youtube-smarttv-emu" license=("MIT") depends=( - "electron${_electronversion}-bin" - 'hicolor-icon-theme' + "electron${_electronversion}" ) provides=("${pkgname%-bin}=${pkgver}") conflicts=("${pkgname%-bin}") @@ -20,11 +19,12 @@ source=( ) sha256sums=('83ba642af297fccc57f6017f32825b0cb523ed35f257905430b7b7cc14400aeb' '2c7bd4372f284a7f952702e50d98d0ef6c5fbb1d1792f9d6d54862cd5fc03860' - 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8') + '2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051') build() { sed -e "s|@electronversion@|${_electronversion}|" \ -e "s|@appname@|${pkgname%-bin}|g" \ -e "s|@runname@|app.asar|g" \ + -e "s|@cfgdirname@|${pkgname%-bin}|g" \ -e "s|@options@||g" \ -i "${srcdir}/${pkgname%-bin}.sh" bsdtar -xf "${srcdir}/data."* diff --git a/youtube-smarttv-emu.sh b/youtube-smarttv-emu.sh index f9ced1432cfc..4cfe3ac09dd8 100644 --- a/youtube-smarttv-emu.sh +++ b/youtube-smarttv-emu.sh @@ -1,14 +1,29 @@ -#!/bin/sh -set -e +#!/bin/bash +set -o pipefail _APPDIR="/usr/lib/@appname@" _RUNNAME="${_APPDIR}/@runname@" +_CFGDIR="@cfgdirname@/" +_OPTIONS="@options@" export PATH="${_APPDIR}:${PATH}" export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}" export ELECTRON_IS_DEV=0 +export ELECTRON_FORCE_IS_PACKAGED=true +export ELECTRON_DISABLE_SECURITY_WARNINGS=true +export ELECTRON_OVERRIDE_DIST_PATH="/usr/bin/electron@electronversion@" export NODE_ENV=production +export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" +export _FLAGS_FILE="${XDG_CONFIG_HOME}/${_CFGDIR}@appname@-flags.conf" +declare -a _USER_FLAGS +if [[ -f "${_FLAGS_FILE}" ]]; then + while read -r line; do + if [[ ! "${line}" =~ ^[[:space:]]*#.* ]]; then + _USER_FLAGS+=("${line}") + fi + done < "${_FLAGS_FILE}" +fi cd "${_APPDIR}" -if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then - exec electron@electronversion@ "${_RUNNAME}" "$@" || exit $? +if [[ "${EUID}" -ne 0 ]] || [[ "${ELECTRON_RUN_AS_NODE}" ]]; then + exec electron@electronversion@ "${_RUNNAME}" ${_OPTIONS} "${_USER_FLAGS[@]}" "$@" else - exec electron@electronversion@ "${_RUNNAME}" --no-sandbox "$@" || exit $? + exec electron@electronversion@ "${_RUNNAME}" ${_OPTIONS} --no-sandbox "${_USER_FLAGS[@]}" "$@" fi
\ No newline at end of file |