AuberBoxTagWebGenerator/openscad_installer

20 lines
453 B
Plaintext
Raw Normal View History

2024-07-12 12:10:26 +02:00
#!/usr/bin/env bash
set -e
function getFileName() {
curl -s https://files.openscad.org/snapshots/ | htmlq 'a[href$="x86_64.AppImage"]' -a href | tail -n1
}
function getDownloadUrl() {
echo "https://files.openscad.org/snapshots/$(getFileName)"
}
wget -q -O /tmp/openscad "$(getDownloadUrl)"
chmod +x /tmp/openscad
chmod +x /tmp/openscad
cd /opt
/tmp/openscad --appimage-extract
ln -s /opt/squashfs-root/usr/bin/openscad /usr/local/bin/openscad