summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052024-02-02 18:50:07 +0800
committerzxp198210052024-02-02 18:50:07 +0800
commitc67f6cabebd0c011a89d0592ef67231b99a96b7d (patch)
tree9eed5098107f223eca1026afabf832ef2c3d7eb4
parent2a7bdbdd23d296b47c6eda371c03b9ceb4b60796 (diff)
downloadaur-c67f6cabebd0c011a89d0592ef67231b99a96b7d.tar.gz
fix errors
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD8
-rw-r--r--escrcpy.sh11
3 files changed, 10 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 69cfd1768a29..cc45b67e45af 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = escrcpy-bin
pkgdesc = 使用图形化的 Scrcpy 显示和控制您的 Android 设备,由 Electron 驱动
pkgver = 1.16.8
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/viarotel-org/escrcpy
arch = aarch64
arch = x86_64
@@ -14,7 +14,7 @@ pkgbase = escrcpy-bin
source = LICENSE-1.16.8::https://raw.githubusercontent.com/viarotel-org/escrcpy/v1.16.8/LICENSE
source = escrcpy.sh
sha256sums = 608449f39836e08b54dbe679e78fefbd8b2a4f77ac6fc16bf7320d1e89e4bb10
- sha256sums = 5ce46265f0335b03568aa06f7b4c57c5f8ffade7a226489ea39796be91a511bf
+ sha256sums = 0fb7b939a071f4a08476bdd5aa143d2aa8cd335c83309f9919be16cd5c3e2014
source_aarch64 = escrcpy-1.16.8-aarch64.deb::https://github.com/viarotel-org/escrcpy/releases/download/v1.16.8/Escrcpy-1.16.8-linux-arm64.deb
sha256sums_aarch64 = 9a78fa700c46864f9308925c36bb483078914c397d8d16797266fff46bc6d895
source_x86_64 = escrcpy-1.16.8-x86_64.deb::https://github.com/viarotel-org/escrcpy/releases/download/v1.16.8/Escrcpy-1.16.8-linux-amd64.deb
diff --git a/PKGBUILD b/PKGBUILD
index 422183b682e4..91fed548087b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@ pkgname=escrcpy-bin
_pkgname=Escrcpy
pkgver=1.16.8
_electronversion=27
-pkgrel=1
+pkgrel=2
pkgdesc="使用图形化的 Scrcpy 显示和控制您的 Android 设备,由 Electron 驱动"
arch=(
'aarch64'
@@ -25,16 +25,16 @@ source=(
"${pkgname%-bin}.sh"
)
sha256sums=('608449f39836e08b54dbe679e78fefbd8b2a4f77ac6fc16bf7320d1e89e4bb10'
- '5ce46265f0335b03568aa06f7b4c57c5f8ffade7a226489ea39796be91a511bf')
+ '0fb7b939a071f4a08476bdd5aa143d2aa8cd335c83309f9919be16cd5c3e2014')
sha256sums_aarch64=('9a78fa700c46864f9308925c36bb483078914c397d8d16797266fff46bc6d895')
sha256sums_x86_64=('9ce56c139996eda8dce8d1c7182a7ee382c9ee4f0846d72e2c231cdadc17ea8a')
build() {
sed -e "s|@electronversion@|${_electronversion}|" \
-e "s|@appname@|${pkgname%-bin}|g" \
- -e "s|@appasar@|app.asar|g" \
+ -e "s|@runname@|app.asar|g" \
-i "${srcdir}/${pkgname%-bin}.sh"
bsdtar -xf "${srcdir}/data.tar.xz"
- sed "s|/opt/${_pkgname}/${pkgname%-bin} %U|${pkgname%-bin}|g" -i "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop"
+ sed "s|/opt/${_pkgname}/${pkgname%-bin}|${pkgname%-bin}|g" -i "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop"
cd "${srcdir}/opt/${_pkgname}/resources/extra/linux"
chmod 755 android-platform-tools/{adb,etc1tool,fastboot,hprof-conv,make_f2fs,make_f2fs_casefold,mke2fs,sqlite3} \
gnirehtet/gnirehtet
diff --git a/escrcpy.sh b/escrcpy.sh
index c77c53567639..f9ced1432cfc 100644
--- a/escrcpy.sh
+++ b/escrcpy.sh
@@ -1,17 +1,14 @@
#!/bin/sh
set -e
_APPDIR="/usr/lib/@appname@"
-_ASAR="${_APPDIR}/@appasar@"
+_RUNNAME="${_APPDIR}/@runname@"
export PATH="${_APPDIR}:${PATH}"
export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}"
export ELECTRON_IS_DEV=0
export NODE_ENV=production
+cd "${_APPDIR}"
if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
- cd "${_APPDIR}"
- exec electron@electronversion@ "${_ASAR}" "$@"
- exit
+ exec electron@electronversion@ "${_RUNNAME}" "$@" || exit $?
else
- cd "${_APPDIR}"
- exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@"
- exit
+ exec electron@electronversion@ "${_RUNNAME}" --no-sandbox "$@" || exit $?
fi \ No newline at end of file