diff options
author | zxp19821005 | 2024-04-02 16:05:32 +0800 |
---|---|---|
committer | zxp19821005 | 2024-04-02 16:05:32 +0800 |
commit | 76fbd8b94869ca8b359ad178cb44afdd898c9c2d (patch) | |
tree | d86c9691a9214b8c6675360877830d0c682a029a | |
parent | 41437cdb9cdad8a4a0edbb99abf046d2dddb23d6 (diff) | |
download | aur-76fbd8b94869ca8b359ad178cb44afdd898c9c2d.tar.gz |
fix errors
-rw-r--r-- | PKGBUILD | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -62,15 +62,14 @@ build() { export ELECTRONVERSION="${_electronversion}" export npm_config_disturl=https://electronjs.org/headers HOME="${srcdir}/.electron-gyp" - #build - cd "${srcdir}/${pkgname//-/.}" - 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 + if [ `curl -s ipinfo.io/country | grep CN | wc -l ` -ge 1 ];then + export npm_config_registry=https://registry.npmmirror.com + export npm_config_electron_mirror=https://registry.npmmirror.com/-/binary/electron/ + export npm_config_electron_builder_binaries_mirror=https://registry.npmmirror.com/-/binary/electron-builder-binaries/ else echo "Your network is OK." fi + cd "${srcdir}/${pkgname//-/.}" # Install packages npm ci --ignore-scripts --prefer-offline --no-audit npm run bootstrap -- --scope=web |