diff options
author | zxp19821005 | 2024-10-12 17:26:17 +0800 |
---|---|---|
committer | zxp19821005 | 2024-10-12 17:26:17 +0800 |
commit | 5b0b66d0602a0cd382e1571368d14c056536b82b (patch) | |
tree | 3117230c2cc30a1b87e3775f90c7f7f6e1e3f691 /PKGBUILD | |
parent | 1b87b57bcd7fd90b544120c11242f1dcdb5ae54f (diff) | |
download | aur-5b0b66d0602a0cd382e1571368d14c056536b82b.tar.gz |
fix errors
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 23 |
1 files changed, 13 insertions, 10 deletions
@@ -5,7 +5,7 @@ pkgver=1.2.3.r0.g5da5388 _electronversion=29 _nodeversion=20 pkgrel=1 -pkgdesc='Client app for ChatGPT, Gemini and Claude with Monaco Editor integration.' +pkgdesc='Client app for ChatGPT, Gemini, Claude, Phind, Perplexity, Genspark and Google AI Studio with Monaco Editor integration.' arch=('any') url="https://github.com/Jun-Murakami/AI-Browser" license=("MIT") @@ -41,11 +41,11 @@ _ensure_local_nvm() { } build() { sed -e " - s/@electronversion@/${_electronversion}/ - s/@appname@/${pkgname%-git}/ - s/@runname@/app.asar/ - s/@cfgdirname@/${pkgname%-git}/ - s/@options@/env ELECTRON_OZONE_PLATFORM_HINT=auto/ + s/@electronversion@/${_electronversion}/g + s/@appname@/${pkgname%-git}/g + s/@runname@/app.asar/g + s/@cfgdirname@/${pkgname%-git}/g + s/@options@/env ELECTRON_OZONE_PLATFORM_HINT=auto/g " -i "${srcdir}/${pkgname%-git}.sh" _ensure_local_nvm gendesk -q -f -n --pkgname="${pkgname%-git}" --pkgdesc="${pkgdesc}" --categories="Utility" --name="${_pkgname}" --exec="${pkgname%-git} %U" @@ -57,16 +57,19 @@ build() { echo -e '\n' #echo 'build_from_source=true' echo "cache=${srcdir}/.npm_cache" - if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then + } >> .npmrc + if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then + { echo 'registry=https://registry.npmmirror.com' echo 'disturl=https://registry.npmmirror.com/-/binary/node/' echo 'electron_mirror=https://registry.npmmirror.com/-/binary/electron/' echo 'electron_builder_binaries_mirror=https://registry.npmmirror.com/-/binary/electron-builder-binaries/' - fi - } >> .npmrc + } >> .npmrc + fi sed -i "s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/" package.json NODE_ENV=development npm install - NODE_ENV=production npm run build:unpack + NODE_ENV=production npm run build + NODE_ENV=production npm exec -c "electron-builder --linux dir -c.electronDist=${electronDist} -c.electronVersion=${_electronversion}" } package() { install -Dm755 "${srcdir}/${pkgname%-git}.sh" "${pkgdir}/usr/bin/${pkgname%-git}" |