summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052024-01-12 19:20:24 +0800
committerzxp198210052024-01-12 19:20:24 +0800
commit278c8b9d831d8d1d952976e707c60e12e7741c39 (patch)
tree99e2be37f2f65f12f4c59ccfdabd36b9141a013e
parent1d99d4e16d73bbd621231c94b7b628c62e9a1a7f (diff)
downloadaur-278c8b9d831d8d1d952976e707c60e12e7741c39.tar.gz
fix errors
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD15
-rw-r--r--tome.sh22
3 files changed, 24 insertions, 19 deletions
diff --git a/.SRCINFO b/.SRCINFO
index cd32f33e7a9f..6b82dc18cfde 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = tome-bin
pkgdesc = Git integrated cross-platform markdown editor
pkgver = 0.7.6
- pkgrel = 2
+ pkgrel = 3
url = https://tome.evinowen.net/
arch = x86_64
license = MIT
@@ -9,10 +9,10 @@ pkgbase = tome-bin
provides = tome=0.7.6
conflicts = tome
source = tome-0.7.6.deb::https://github.com/evinowen/tome/releases/download/0.7.6/Tome.Setup.0.7.6.deb
- source = LICENSE.txt-0.7.6::https://raw.githubusercontent.com/evinowen/tome/0.7.6/LICENSE.txt
+ source = LICENSE-0.7.6.txt::https://raw.githubusercontent.com/evinowen/tome/0.7.6/LICENSE.txt
source = tome.sh
sha256sums = d5a368995788813d2a971e1560a009da2b98311256b82151ebe8573600ba03bb
sha256sums = 3103a7058613516746435f89ff07509d42d9a07a485ad7b7fbc2781b06be4722
- sha256sums = a8a1d7c7dcb44627d7befdea39a4365e56c0f2b19c5fa0aec78d31100d903d21
+ sha256sums = d4272fed78cdcacd9edfb019134ac485d65b43f4d8c7a4179edbaed56af9b231
pkgname = tome-bin
diff --git a/PKGBUILD b/PKGBUILD
index 2a3dea013d8d..05e73f42bf4d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@ pkgname=tome-bin
_pkgname=Tome
pkgver=0.7.6
_electronversion=18
-pkgrel=2
+pkgrel=3
pkgdesc="Git integrated cross-platform markdown editor"
arch=("x86_64")
url="https://tome.evinowen.net/"
@@ -16,16 +16,19 @@ depends=(
)
source=(
"${pkgname%-bin}-${pkgver}.deb::${_ghurl}/releases/download/${pkgver}/${_pkgname}.Setup.${pkgver}.deb"
- "LICENSE.txt-${pkgver}::https://raw.githubusercontent.com/evinowen/tome/${pkgver}/LICENSE.txt"
+ "LICENSE-${pkgver}.txt::https://raw.githubusercontent.com/evinowen/tome/${pkgver}/LICENSE.txt"
"${pkgname%-bin}.sh"
)
sha256sums=('d5a368995788813d2a971e1560a009da2b98311256b82151ebe8573600ba03bb'
'3103a7058613516746435f89ff07509d42d9a07a485ad7b7fbc2781b06be4722'
- 'a8a1d7c7dcb44627d7befdea39a4365e56c0f2b19c5fa0aec78d31100d903d21')
+ 'd4272fed78cdcacd9edfb019134ac485d65b43f4d8c7a4179edbaed56af9b231')
build() {
- sed -i "s|@electronversion@|${_electronversion}|" "$srcdir/${pkgname%-bin}.sh"
+ sed -e "s|@electronversion@|${_electronversion}|g" \
+ -e "s|@appname@|${pkgname%-bin}|g" \
+ -e "s|@appasar@|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"
}
package() {
install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
@@ -33,5 +36,5 @@ package() {
cp -r "${srcdir}/opt/${_pkgname}/resources/app.asar.unpacked" "${pkgdir}/usr/lib/${pkgname%-bin}"
install -Dm644 "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
install -Dm644 "${srcdir}/usr/share/icons/hicolor/0x0/apps/${pkgname%-bin}.png" -t "${pkgdir}/usr/share/pixmaps"
- install -Dm644 "${srcdir}/LICENSE.txt-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install -Dm644 "${srcdir}/LICENSE-${pkgver}.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
} \ No newline at end of file
diff --git a/tome.sh b/tome.sh
index 03132923709f..aacd8f895847 100644
--- a/tome.sh
+++ b/tome.sh
@@ -1,13 +1,15 @@
-#!/bin/bash
-APPDIR="/usr/lib/tome"
-export PATH="${APPDIR}:${PATH}"
+#!/bin/sh
+set -e
+_APPDIR="/usr/lib/@appname@"
+_ASAR="${_APPDIR}/@appasar@"
+export PATH="${_APPDIR}:${PATH}"
+export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}"
export ELECTRON_IS_DEV=0
-#export LD_LIBRARY_PATH="${APPDIR}/swiftshader:${LD_LIBRARY_PATH}"
-_ASAR="${APPDIR}/app.asar"
+export NODE_ENV=production
+cd "${_APPDIR}"
if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
- cd $APPDIR
- exec electron@electronversion@ ${_ASAR} "$@"
+ exec electron@electronversion@ "${_ASAR}" "$@"
else
- cd $APPDIR
- exec electron@electronversion@ ${_ASAR} --no-sandbox "$@"
-fi \ No newline at end of file
+ exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@"
+fi
+exit \ No newline at end of file