summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052024-01-19 15:41:37 +0800
committerzxp198210052024-01-19 15:41:37 +0800
commit3646cdf900e3257289a70ec559d5a40d82fadb15 (patch)
treed232af53cc5fc6c8f2abf63831ce09ea8f20cdbe
parent27abf96f82cd95e255596ebb752e3131b07a2cfd (diff)
downloadaur-3646cdf900e3257289a70ec559d5a40d82fadb15.tar.gz
fix errors
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD6
-rw-r--r--space-snake.sh13
3 files changed, 12 insertions, 11 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f3966d3dabba..1cbf4674e428 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = space-snake-bin
pkgdesc = A Desktop game built with Electron and Vue.js.
pkgver = 0.11.1
- pkgrel = 5
+ pkgrel = 6
url = https://github.com/ilyagru/Space-Snake
arch = x86_64
license = MIT
@@ -14,6 +14,6 @@ pkgbase = space-snake-bin
source = space-snake.sh
sha256sums = b4ed62ff9b5dc3cc815f0ac5328dc602ce29f6bb3231beab622c246c7c2554f9
sha256sums = 2cf69008e16f9f81098eaed1b59e481bafb258606cc9171047db9b6fdec6cb9f
- sha256sums = 8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84
+ sha256sums = d4272fed78cdcacd9edfb019134ac485d65b43f4d8c7a4179edbaed56af9b231
pkgname = space-snake-bin
diff --git a/PKGBUILD b/PKGBUILD
index 53b684f552ab..93533ff74c4b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@ pkgname=space-snake-bin
_pkgname=Space-Snake
pkgver=0.11.1
_electronversion=4
-pkgrel=5
+pkgrel=6
pkgdesc="A Desktop game built with Electron and Vue.js."
arch=('x86_64')
url="https://github.com/ilyagru/Space-Snake"
@@ -23,13 +23,13 @@ source=(
)
sha256sums=('b4ed62ff9b5dc3cc815f0ac5328dc602ce29f6bb3231beab622c246c7c2554f9'
'2cf69008e16f9f81098eaed1b59e481bafb258606cc9171047db9b6fdec6cb9f'
- '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"
- gendesk -q -f -n --categories "Game" --name "${_pkgname}" --exec "${pkgname%-bin}"
+ gendesk -q -f -n --categories "Game" --name "${_pkgname}" --exec "${pkgname%-bin} %U"
}
package() {
install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/opt/${pkgname%-bin}/${pkgname%-bin}"
diff --git a/space-snake.sh b/space-snake.sh
index 2ec4412e5c4f..aacd8f895847 100644
--- a/space-snake.sh
+++ b/space-snake.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