mirror of
https://github.com/CompeyDev/lune-packaging.git
synced 2025-01-09 20:29:10 +00:00
24 lines
504 B
Bash
24 lines
504 B
Bash
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 {} \;
|