feat(apt): shell script for updating lune binaries

This commit is contained in:
Erica Marigold 2023-08-05 19:45:30 +05:30 committed by GitHub
parent 61158dd0f8
commit 7ce22cee0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,24 @@
API_RESP=$(curl -s "https://api.github.com/repos/filiptibell/lune/releases/latest")
for dir in ./*/
do
dir=${dir%*/}
dir=${dir##*/}
arch=$(echo $dir | cut -d '_' -f2)
case $arch in
arm64)
arch="aarch64"
;;
x86-64|amd64)
arch="x86_64"
;;
esac
dl_uri=$(grep -E "https.*lune-.*linux-$arch.zip" <<< $API_RESP | cut -d '"' -f4)
wget $dl_uri -O $dir/usr/bin/lune
done
find . -maxdepth 1 -mindepth 1 -type d -exec dpkg --build {} \;