diff options
author | zxp19821005 | 2025-03-05 08:18:22 +0800 |
---|---|---|
committer | zxp19821005 | 2025-03-05 08:18:22 +0800 |
commit | de9605e1099ece0d3f976187a1bb7a3fcb886791 (patch) | |
tree | 52cc951fbf7e9da806b1196b9b80c40f890fbc63 | |
parent | ebdfa8ebc71b7feae7f273bde582fb99acb3ec38 (diff) | |
download | aur-de9605e1099ece0d3f976187a1bb7a3fcb886791.tar.gz |
update to fix errors
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 35 | ||||
-rw-r--r-- | postcat.sh | 2 |
3 files changed, 24 insertions, 19 deletions
@@ -1,7 +1,7 @@ pkgbase = postcat-bin - pkgdesc = Postcat 是一个可扩展的 API 工具平台。集合基础的 API 管理和测试功能,并且可以通过插件简化你的 API 开发工作,让你可以更快更好地创建 API。An extensible API tool. + pkgdesc = An extensible API tool platform. A collection of basic API management and testing capabilities, and can simplify your API development work through plugins, allowing you to create APIs faster and better. An extensible API tool.(Prebuilt version.Use system-wide electron) pkgver = 0.5.1 - pkgrel = 8 + pkgrel = 9 url = https://www.postcat.com/ arch = x86_64 license = Apache-2.0 @@ -12,6 +12,6 @@ pkgbase = postcat-bin source = postcat-0.5.1.AppImage::https://github.com/Postcatlab/postcat/releases/download/v0.5.1/Postcat-0.5.1.AppImage source = postcat.sh sha256sums = 9a1a3928d64df829b151d9aac4a69a4a8a0db6427f478c8af1cead260383e1ae - sha256sums = 2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051 + sha256sums = 291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980 pkgname = postcat-bin @@ -3,8 +3,8 @@ pkgname=postcat-bin _pkgname=Postcat pkgver=0.5.1 _electronversion=22 -pkgrel=8 -pkgdesc="Postcat 是一个可扩展的 API 工具平台。集合基础的 API 管理和测试功能,并且可以通过插件简化你的 API 开发工作,让你可以更快更好地创建 API。An extensible API tool." +pkgrel=9 +pkgdesc="An extensible API tool platform. A collection of basic API management and testing capabilities, and can simplify your API development work through plugins, allowing you to create APIs faster and better. An extensible API tool.(Prebuilt version.Use system-wide electron)" arch=('x86_64') url="https://www.postcat.com/" _ghurl="https://github.com/Postcatlab/postcat" @@ -20,24 +20,29 @@ source=( "${pkgname%-bin}.sh" ) sha256sums=('9a1a3928d64df829b151d9aac4a69a4a8a0db6427f478c8af1cead260383e1ae' - '2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051') -build() { - sed -e "s|@electronversion@|${_electronversion}|" \ - -e "s|@appname@|${pkgname%-bin}|g" \ - -e "s|@runname@|app.asar|g" \ - -e "s|@cfgdirname@|${pkgname%-bin}|g" \ - -e "s|@options@||g" \ - -i "${srcdir}/${pkgname%-bin}.sh" - chmod a+x "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" + '291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980') +prepare() { + sed -i -e " + s/@electronversion@/${_electronversion}/g + s/@appname@/${pkgname%-bin}/g + s/@runname@/app.asar/g + s/@cfgdirname@/${pkgname%-bin}/g + s/@options@//g + " "${srcdir}/${pkgname%-bin}.sh" + chmod +x "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" --appimage-extract > /dev/null - sed "s|AppRun --no-sandbox|${pkgname%-bin}|g;s|Utility|Utility;Development|g" -i "${srcdir}/squashfs-root/${pkgname%-bin}.desktop" - find "${srcdir}/squashfs-root/resources" -type d -exec chmod 755 {} \; + sed -i -e " + s/AppRun --no-sandbox/${pkgname%-bin}/g + s/Utility/Utility;Development/g + " "${srcdir}/squashfs-root/${pkgname%-bin}.desktop" + find "${srcdir}/squashfs-root/resources" -type d -exec chmod 755 {} + } package() { install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}" install -Dm644 "${srcdir}/squashfs-root/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}" - cp -r "${srcdir}/squashfs-root/resources/app.asar.unpacked" "${pkgdir}/usr/lib/${pkgname%-bin}" - for _icons in 16x16 24x24 32x32 48x48 64x64 128x128 256x256 512x512 1024x1024;do + cp -Pr --no-preserve=ownership "${srcdir}/squashfs-root/resources/app.asar.unpacked" "${pkgdir}/usr/lib/${pkgname%-bin}" + _icon_sizes=(16x16 24x24 32x32 48x48 64x64 128x128 256x256 512x512 1024x1024) + for _icons in "${_icon_sizes[@]}";do install -Dm644 "${srcdir}/squashfs-root/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-bin}.png" \ -t "${pkgdir}/usr/share/icons/hicolor/${_icons}/apps" done diff --git a/postcat.sh b/postcat.sh index 4cfe3ac09dd8..40e422ca2ee7 100644 --- a/postcat.sh +++ b/postcat.sh @@ -21,7 +21,7 @@ if [[ -f "${_FLAGS_FILE}" ]]; then fi done < "${_FLAGS_FILE}" fi -cd "${_APPDIR}" +cd "${_APPDIR}" || { echo "Failed to change directory to ${_APPDIR}"; exit 1; } if [[ "${EUID}" -ne 0 ]] || [[ "${ELECTRON_RUN_AS_NODE}" ]]; then exec electron@electronversion@ "${_RUNNAME}" ${_OPTIONS} "${_USER_FLAGS[@]}" "$@" else |