diff options
author | zxp19821005 | 2024-03-14 12:44:01 +0800 |
---|---|---|
committer | zxp19821005 | 2024-03-14 12:44:01 +0800 |
commit | 3f2a4682665fd06b993583b665f1fb1855374e76 (patch) | |
tree | 2ed77724aa824e80531302cb9dedb5c94ffac048 | |
parent | 43640e8f842fb26d3babc453a25a3333c8e4aa96 (diff) | |
download | aur-3f2a4682665fd06b993583b665f1fb1855374e76.tar.gz |
fix errors
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 11 | ||||
-rw-r--r-- | insomnium.sh | 5 |
3 files changed, 13 insertions, 5 deletions
@@ -16,6 +16,6 @@ pkgbase = insomnium-git source = insomnium.git::git+https://github.com/ArchGPT/insomnium.git source = insomnium.sh sha256sums = SKIP - sha256sums = 50b10386d13e5bec806aeb78f819c4edd0208a4d184332e53866c802731217fe + sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8 pkgname = insomnium-git @@ -26,7 +26,7 @@ source=( "${pkgname%-git}.sh" ) sha256sums=('SKIP' - '50b10386d13e5bec806aeb78f819c4edd0208a4d184332e53866c802731217fe') + 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8') pkgver() { cd "${srcdir}/${pkgname//-/.}" git describe --long --tags --exclude='*[a-z][a-z]*' | sed -E 's/^v//;s/([^-]*-g)/r\1/;s/-/./g' @@ -53,7 +53,14 @@ build() { export ELECTRONVERSION="${_electronversion}" export npm_config_disturl=https://electronjs.org/headers HOME="${srcdir}/.electron-gyp" - sed '121,132d' -i packages/insomnia/electron-builder.config.js + 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 + sed "s|electron-builder build|electron-builder build --dir|g" -i packages/insomnia/package.json npm ci npm run app-package } diff --git a/insomnium.sh b/insomnium.sh index 86cb3dc6a9bf..7ddcaab8d734 100644 --- a/insomnium.sh +++ b/insomnium.sh @@ -2,6 +2,7 @@ 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 @@ -9,7 +10,7 @@ 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 |