summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052024-01-12 19:15:00 +0800
committerzxp198210052024-01-12 19:15:00 +0800
commit62d5b201b0964ea1e6564c462c36ebb5a3037395 (patch)
treea90e5ab0ee64c45cc8a53c6c5329b60998c6f220
parenta6eb4748cc9fa9fed4b4bda2ea74d253c1bd08b5 (diff)
downloadaur-62d5b201b0964ea1e6564c462c36ebb5a3037395.tar.gz
fix errors
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD11
-rw-r--r--masscode.sh22
3 files changed, 21 insertions, 16 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 622d53d762a0..919cac72cc62 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = masscode-bin
pkgdesc = A free and open source code snippets manager for developers
pkgver = 3.10.0
- pkgrel = 2
+ pkgrel = 3
url = https://masscode.io/
arch = x86_64
license = AGPL3
@@ -13,6 +13,6 @@ pkgbase = masscode-bin
source = masscode-3.10.0.snap::https://github.com/massCodeIO/massCode/releases/download/v3.10.0/masscode_3.10.0_amd64.snap
source = masscode.sh
sha256sums = d4e9aebeabac38aba5180a89083c25ea2e53028ce39a44d57a058d8d76232d6d
- sha256sums = c5e1e4400e87a6705b17363a7fc766be3abb898a374b643ded1724557ec221ca
+ sha256sums = d4272fed78cdcacd9edfb019134ac485d65b43f4d8c7a4179edbaed56af9b231
pkgname = masscode-bin
diff --git a/PKGBUILD b/PKGBUILD
index 62f6a52100b5..129c9cf55e9c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@ pkgname=masscode-bin
_pkgname=massCode
pkgver=3.10.0
_electronversion=16
-pkgrel=2
+pkgrel=3
pkgdesc="A free and open source code snippets manager for developers"
arch=('x86_64')
url="https://masscode.io/"
@@ -23,11 +23,14 @@ source=(
"${pkgname%-bin}.sh"
)
sha256sums=('d4e9aebeabac38aba5180a89083c25ea2e53028ce39a44d57a058d8d76232d6d'
- 'c5e1e4400e87a6705b17363a7fc766be3abb898a374b643ded1724557ec221ca')
+ '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"
unsquashfs "${srcdir}/${pkgname%-bin}-${pkgver}.snap"
- gendesk -q -f -n --categories "Development;Utility" --name "${_pkgname}" --exec "${pkgname%-bin}"
+ gendesk -q -f -n --categories "Development" --name "${_pkgname}" --exec "${pkgname%-bin} %U"
}
package() {
install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
diff --git a/masscode.sh b/masscode.sh
index 13fc2c4b641c..aacd8f895847 100644
--- a/masscode.sh
+++ b/masscode.sh
@@ -1,13 +1,15 @@
-#!/bin/bash
-APPDIR="/usr/lib/masscode"
-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