summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052024-03-13 11:50:59 +0800
committerzxp198210052024-03-13 11:50:59 +0800
commit166d3ba1a9fc3e0b26bd5956867b11e6bcc68fb8 (patch)
tree7f2c199efb06b1e2307f35fec0154a8f4533d60d
parentee5d6f4aab1c99da4708a1f8295f78b3fbe4ce0c (diff)
downloadaur-166d3ba1a9fc3e0b26bd5956867b11e6bcc68fb8.tar.gz
fix errors
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD12
-rw-r--r--hiregpt.sh8
3 files changed, 17 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8c3e967a7157..8b8f3dd381b7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = hiregpt
pkgdesc = Job application made easy with OpenAI GPT model
pkgver = 0.2.0
- pkgrel = 6
+ pkgrel = 7
url = https://github.com/jaejaywoo/HireGPT
arch = any
license = MIT
@@ -14,6 +14,6 @@ pkgbase = hiregpt
source = hiregpt.git::git+https://github.com/jaejaywoo/HireGPT.git#tag=v0.2.0
source = hiregpt.sh
sha256sums = SKIP
- sha256sums = 0fb7b939a071f4a08476bdd5aa143d2aa8cd335c83309f9919be16cd5c3e2014
+ sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8
pkgname = hiregpt
diff --git a/PKGBUILD b/PKGBUILD
index f5623bdb4319..f6e90fb980a6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@ _pkgname=HireGPT
pkgver=0.2.0
_electronversion=23
_nodeversion=16
-pkgrel=6
+pkgrel=7
pkgdesc="Job application made easy with OpenAI GPT model"
arch=('any')
url="https://github.com/jaejaywoo/HireGPT"
@@ -25,7 +25,7 @@ source=(
"${pkgname%-bin}.sh"
)
sha256sums=('SKIP'
- '0fb7b939a071f4a08476bdd5aa143d2aa8cd335c83309f9919be16cd5c3e2014')
+ 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8')
_ensure_local_nvm() {
export NVM_DIR="${srcdir}/.nvm"
source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
@@ -36,6 +36,7 @@ build() {
sed -e "s|@electronversion@|${_electronversion}|" \
-e "s|@appname@|${pkgname}|g" \
-e "s|@runname@|app|g" \
+ -e "s|@options@||g" \
-i "${srcdir}/${pkgname}.sh"
_ensure_local_nvm
gendesk -f -q -n --categories="Utility" --name="${_pkgname}" --exec="${pkgname} %U"
@@ -48,6 +49,13 @@ build() {
export ELECTRONVERSION="${_electronversion}"
export npm_config_disturl=https://electronjs.org/headers
HOME="${srcdir}/.electron-gyp"
+ if [ `curl ifconfig.co/country` = "China" ];then
+ echo 'registry="https://registry.npmmirror.com/"' >> .npmrc
+ echo 'electron_mirror="https://registry.npmmirror.com/-/binary/electron/"' >> .npmrc
+ echo 'electron_builder_binaries_mirror="https://registry.npmmirror.com/-/binary/electron-builder-binaries/"' >> .npmrc
+ else
+ echo "Your network is OK."
+ fi
npm install
npm run package
}
diff --git a/hiregpt.sh b/hiregpt.sh
index f9ced1432cfc..7ddcaab8d734 100644
--- a/hiregpt.sh
+++ b/hiregpt.sh
@@ -1,14 +1,16 @@
-#!/bin/sh
+#!/bin/bash
set -e
_APPDIR="/usr/lib/@appname@"
_RUNNAME="${_APPDIR}/@runname@"
+_OPTIONS="@options@"
export PATH="${_APPDIR}:${PATH}"
export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}"
export ELECTRON_IS_DEV=0
+export ELECTRON_FORCE_IS_PACKAGED=true
export NODE_ENV=production
cd "${_APPDIR}"
if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
- exec electron@electronversion@ "${_RUNNAME}" "$@" || exit $?
+ exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" "$@" || exit $?
else
- exec electron@electronversion@ "${_RUNNAME}" --no-sandbox "$@" || exit $?
+ exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" --no-sandbox "$@" || exit $?
fi \ No newline at end of file