diff options
author | zxp19821005 | 2024-03-21 12:41:47 +0800 |
---|---|---|
committer | zxp19821005 | 2024-03-21 12:41:47 +0800 |
commit | 7d1dbd7fb2d069c9c95e480b2134e0f4697accb1 (patch) | |
tree | f6f42577d89964e1076f2f5ae8dd9c38dbb13b6b | |
parent | ef72aff0ba02ace3fda531814e5fd0e2ef18fb33 (diff) | |
download | aur-7d1dbd7fb2d069c9c95e480b2134e0f4697accb1.tar.gz |
fix errors
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 13 | ||||
-rw-r--r-- | hihat.sh | 5 |
3 files changed, 15 insertions, 8 deletions
@@ -9,13 +9,12 @@ pkgbase = hihat-git makedepends = git makedepends = nvm makedepends = npm - depends = electron26 - depends = hicolor-icon-theme + depends = electron26-bin provides = hihat conflicts = hihat source = hihat.git::git+https://github.com/johnnyshankman/hihat.git source = hihat.sh sha256sums = SKIP - sha256sums = 50b10386d13e5bec806aeb78f819c4edd0208a4d184332e53866c802731217fe + sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8 pkgname = hihat-git @@ -15,8 +15,7 @@ provides=( "${pkgname%-git}" ) depends=( - "electron${_electronversion}" - 'hicolor-icon-theme' + "electron${_electronversion}-bin" ) makedepends=( 'gendesk' @@ -29,7 +28,7 @@ source=( "${pkgname%-git}.sh" ) sha256sums=('SKIP' - '50b10386d13e5bec806aeb78f819c4edd0208a4d184332e53866c802731217fe') + 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8') pkgver() { cd "${srcdir}/${pkgname//-/.}" git describe --long --tags | sed -E 's/^v//;s/([^-]*-g)/r\1/;s/-/./g' @@ -55,7 +54,15 @@ build() { export ELECTRONVERSION="${_electronversion}" export npm_config_disturl=https://electronjs.org/headers HOME="${srcdir}/.electron-gyp" + if [ `curl -s ipinfo.io/country | grep CN | wc -l ` -ge 1 ];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 cd "${srcdir}/${pkgname//-/.}" + sed "s|--publish never|--dir|g" -i package.json npm install npm run package } @@ -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 |