lune-packaging/package/dpkg/deb/update_bins.sh

28 lines
571 B
Bash
Raw Permalink Normal View History

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)
2023-08-10 03:08:45 +01:00
wget $dl_uri -O lune-$arch.zip
unzip "lune-$arch.zip" -d $dir/usr/bin/
rm -rf "lune-$arch"
done
find . -maxdepth 1 -mindepth 1 -type d -exec dpkg --build {} \;