mirror of
https://github.com/helfrichmichael/prusaslicer-novnc.git
synced 2024-08-30 18:32:27 +00:00
2747747d37
Signed-off-by: vajonam <152501+vajonam@users.noreply.github.com>
38 lines
695 B
Bash
Executable File
38 lines
695 B
Bash
Executable File
#!/bin/bash
|
|
|
|
TMPDIR="$(mktemp -d)"
|
|
|
|
curl -SsL https://api.github.com/repos/prusa3d/PrusaSlicer/releases/latest > $TMPDIR/latest.json
|
|
|
|
url=$(jq -r '.assets[] | select(.browser_download_url|test("linux-x64-(?!GTK2).+.tar.bz2$"))| .browser_download_url' $TMPDIR/latest.json)
|
|
name=$(jq -r '.assets[] | select(.browser_download_url|test("linux-x64-(?!GTK2).+.tar.bz2$"))| .name' $TMPDIR/latest.json)
|
|
version=$(jq -r .tag_name $TMPDIR/latest.json)
|
|
|
|
if [ $# -ne 1 ]; then
|
|
echo "Wrong number of params"
|
|
exit 1
|
|
else
|
|
request=$1
|
|
fi
|
|
|
|
case $request in
|
|
|
|
url)
|
|
echo $url
|
|
;;
|
|
|
|
name)
|
|
echo $name
|
|
;;
|
|
|
|
version)
|
|
echo $version
|
|
;;
|
|
|
|
*)
|
|
echo "Unknown request"
|
|
;;
|
|
esac
|
|
|
|
exit 0
|