mirror of
https://github.com/CompeyDev/lune-packaging.git
synced 2025-01-09 04:09:09 +00:00
feat(apt): shell script for updating lune binaries
This commit is contained in:
parent
61158dd0f8
commit
7ce22cee0e
1 changed files with 24 additions and 0 deletions
24
package/dpkg/deb/update_bins.sh
Normal file
24
package/dpkg/deb/update_bins.sh
Normal 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 {} \;
|
Loading…
Reference in a new issue