diff options
author | zxp19821005 | 2024-07-10 13:03:23 +0800 |
---|---|---|
committer | zxp19821005 | 2024-07-10 13:03:23 +0800 |
commit | 79df6681570b27ba4e8bf2533b31704ce21e351b (patch) | |
tree | 3c196d7755e2abab1d9b45114c01ebb684f667a3 | |
parent | 2a5ff6916818b96df53fd7470fb92a228db527ec (diff) | |
download | aur-79df6681570b27ba4e8bf2533b31704ce21e351b.tar.gz |
fix errors
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 11 | ||||
-rw-r--r-- | aliyun-adrive.sh | 21 |
3 files changed, 27 insertions, 11 deletions
@@ -1,7 +1,7 @@ pkgbase = aliyun-adrive-bin pkgdesc = Aliyun aDrive阿里云盘 pkgver = 4.11.0 - pkgrel = 5 + pkgrel = 6 url = https://www.aliyundrive.com arch = x86_64 license = LicenseRef-custom @@ -12,11 +12,11 @@ pkgbase = aliyun-adrive-bin conflicts = aliyun-adrive conflicts = deepin-wine-adrive conflicts = adrive - source = aliyun-adrive-4.11.0.exe::https://cdn.aliyundrive.net/downloads/apps/desktop/aDrive-4.11.0.exe + source = aliyun-adrive-4.11.0.exe::https://github.com/zxp19821005/My_AUR_Files/releases/download/aDrive4.11.0/aDrive-4.11.0.exe source = LICENSE.html source = aliyun-adrive.sh sha256sums = 507bf86e5dffe75fc9cdd8caea0e1b284dd10dfeba435e331040c305958df7a6 sha256sums = ee4bf71493d9425c0270f59a72778d52b53a9bdcb981f462d1e699d347e9246e - sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8 + sha256sums = 2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051 pkgname = aliyun-adrive-bin @@ -1,11 +1,13 @@ # Maintainer: zxp19821005 <zxp19821005 at 163 dot com> pkgname=aliyun-adrive-bin +_pkgname=aDrive pkgver=4.11.0 _electronversion=22 -pkgrel=5 +pkgrel=6 pkgdesc="Aliyun aDrive阿里云盘" arch=('x86_64') url="https://www.aliyundrive.com" +_dlurl="https://github.com/zxp19821005/My_AUR_Files" license=('LicenseRef-custom') conflicts=( "${pkgname%-bin}" @@ -21,20 +23,21 @@ makedepends=( 'p7zip' ) source=( - "${pkgname%-bin}-${pkgver}.exe::https://cdn.aliyundrive.net/downloads/apps/desktop/aDrive-${pkgver}.exe" + "${pkgname%-bin}-${pkgver}.exe::${_dlurl}/releases/download/${_pkgname}${pkgver}/${_pkgname}-${pkgver}.exe" "LICENSE.html" "${pkgname%-bin}.sh" ) sha256sums=('507bf86e5dffe75fc9cdd8caea0e1b284dd10dfeba435e331040c305958df7a6' 'ee4bf71493d9425c0270f59a72778d52b53a9bdcb981f462d1e699d347e9246e' - 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8') + '2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051') build() { sed -e "s|@electronversion@|${_electronversion}|" \ -e "s|@appname@|${pkgname%-bin}|g" \ -e "s|@runname@|app.asar|g" \ + -e "s|@cfgdirname@|${_pkgname}|g" \ -e "s|@options@||g" \ -i "${srcdir}/${pkgname%-bin}.sh" - gendesk -q -f -n --categories="Network" --name="${pkgname%-bin}阿里云盘" --exec="${pkgname%-bin} %U" + gendesk -q -f -n --pkgname="${pkgname%-bin}" --pkgdesc="${pkgdesc}" --categories="Network" --name="${pkgname%-bin}阿里云盘" --exec="${pkgname%-bin} %U" install -Dm755 -d "${srcdir}/tmp" 7z x -aoa "${srcdir}/${pkgname%-bin}-${pkgver}.exe" -o"${srcdir}/tmp" find "${srcdir}/tmp/resources" -type d -exec chmod 755 {} \; diff --git a/aliyun-adrive.sh b/aliyun-adrive.sh index 7ddcaab8d734..4cfe3ac09dd8 100644 --- a/aliyun-adrive.sh +++ b/aliyun-adrive.sh @@ -1,16 +1,29 @@ #!/bin/bash -set -e +set -o pipefail _APPDIR="/usr/lib/@appname@" _RUNNAME="${_APPDIR}/@runname@" +_CFGDIR="@cfgdirname@/" _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 ELECTRON_DISABLE_SECURITY_WARNINGS=true +export ELECTRON_OVERRIDE_DIST_PATH="/usr/bin/electron@electronversion@" export NODE_ENV=production +export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" +export _FLAGS_FILE="${XDG_CONFIG_HOME}/${_CFGDIR}@appname@-flags.conf" +declare -a _USER_FLAGS +if [[ -f "${_FLAGS_FILE}" ]]; then + while read -r line; do + if [[ ! "${line}" =~ ^[[:space:]]*#.* ]]; then + _USER_FLAGS+=("${line}") + fi + done < "${_FLAGS_FILE}" +fi cd "${_APPDIR}" -if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then - exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" "$@" || exit $? +if [[ "${EUID}" -ne 0 ]] || [[ "${ELECTRON_RUN_AS_NODE}" ]]; then + exec electron@electronversion@ "${_RUNNAME}" ${_OPTIONS} "${_USER_FLAGS[@]}" "$@" else - exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" --no-sandbox "$@" || exit $? + exec electron@electronversion@ "${_RUNNAME}" ${_OPTIONS} --no-sandbox "${_USER_FLAGS[@]}" "$@" fi
\ No newline at end of file |