summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052024-01-17 23:28:59 +0800
committerzxp198210052024-01-17 23:28:59 +0800
commit0eb2824be143f545f0581e8a9b4b426b5c5c1209 (patch)
treef7603e75270f1b32c5900c1abd7988fc61a6a492
parent60a2220c21eaccd518f1f5b81a4037f5ba88dcad (diff)
downloadaur-0eb2824be143f545f0581e8a9b4b426b5c5c1209.tar.gz
fix errors
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD6
-rw-r--r--onote.sh13
3 files changed, 12 insertions, 11 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 64d480b37128..a08b848040e1 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = onote-bin
pkgdesc = Markdown note taking application, based on monaco editor, supports local and SSH data sources.Markdown笔记应用,基于monaco-editor,支持本地及SSH数据源
pkgver = 0.10.0
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/pansinm/ONote
arch = x86_64
license = MIT
@@ -16,6 +16,6 @@ pkgbase = onote-bin
source = onote.sh
sha256sums = 0a9ffd9d0fed0147c838b1ecb8fdedef70de2c15b7874ff02a1cdcf597d6999f
sha256sums = ac76bfd52440815cb3e8ec5ea00f1f9b82c9b404219814f2f05c3fe44a9446c5
- sha256sums = 8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84
+ sha256sums = d4272fed78cdcacd9edfb019134ac485d65b43f4d8c7a4179edbaed56af9b231
pkgname = onote-bin
diff --git a/PKGBUILD b/PKGBUILD
index 4c22a53aebd4..5e85eeb30813 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@ pkgname=onote-bin
_pkgname=ONote
pkgver=0.10.0
_electronversion=25
-pkgrel=2
+pkgrel=3
pkgdesc="Markdown note taking application, based on monaco editor, supports local and SSH data sources.Markdown笔记应用,基于monaco-editor,支持本地及SSH数据源"
arch=("x86_64")
url="https://github.com/pansinm/ONote"
@@ -23,14 +23,14 @@ source=(
)
sha256sums=('0a9ffd9d0fed0147c838b1ecb8fdedef70de2c15b7874ff02a1cdcf597d6999f'
'ac76bfd52440815cb3e8ec5ea00f1f9b82c9b404219814f2f05c3fe44a9446c5'
- '8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84')
+ 'd4272fed78cdcacd9edfb019134ac485d65b43f4d8c7a4179edbaed56af9b231')
build() {
sed -e "s|@electronversion@|${_electronversion}|" \
-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}"
diff --git a/onote.sh b/onote.sh
index 2ec4412e5c4f..aacd8f895847 100644
--- a/onote.sh
+++ b/onote.sh
@@ -1,14 +1,15 @@
-#!/bin/bash
+#!/bin/sh
set -e
_APPDIR="/usr/lib/@appname@"
+_ASAR="${_APPDIR}/@appasar@"
export PATH="${_APPDIR}:${PATH}"
-export ELECTRON_IS_DEV=0
export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}"
-_ASAR="${_APPDIR}/@appasar@"
+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}" "$@"
else
- cd "${_APPDIR}"
exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@"
-fi \ No newline at end of file
+fi
+exit \ No newline at end of file