Fix sha256 method in aur build

This commit is contained in:
oxmc
2024-12-20 08:48:23 -08:00
parent 3d67f6d5ae
commit 685c2dc210

View File

@@ -16,14 +16,17 @@ icon_name="bsky-desktop.png"
prepare() {
latest_tag=$(curl -s "https://api.github.com/repos/oxmc/bsky-desktop/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")')
latest_sha256=$(curl -Ls "https://github.com/oxmc/bsky-desktop/releases/download/$latest_tag/sha256sums.txt" | grep "AppImage")
echo "Latest release tag: $latest_tag"
case "$CARCH" in
x86_64)
appimage_name="bskyDesktop-${latest_tag:1}-linux-x64.AppImage"
sha256sum=$(echo "$latest_sha256" | grep "x64" | cut -d' ' -f1)
;;
aarch64)
appimage_name="bskyDesktop-${latest_tag:1}-linux-arm64.AppImage"
sha256sum=$(echo "$latest_sha256" | grep "arm64" | cut -d' ' -f1)
;;
*)
echo "Unsupported architecture: $CARCH"
@@ -36,7 +39,7 @@ prepare() {
"$icon_url"
)
echo "AppImage source: ${source[0]}"
sha256sums=('SKIP' 'SKIP')
sha256sums=("$sha256sum" 'SKIP')
curl -L "${source[0]}" -o "$srcdir/bskyDesktop.appimage"
curl -L "${source[1]}" -o "$srcdir/$icon_name"
}