Skip to content

Commit

Permalink
Fix sha256 method in aur build
Browse files Browse the repository at this point in the history
  • Loading branch information
oxmc committed Dec 20, 2024
1 parent 3d67f6d commit 685c2dc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
}
Expand Down

0 comments on commit 685c2dc

Please sign in to comment.