-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathruffle-appimage.sh
More file actions
28 lines (22 loc) · 856 Bytes
/
ruffle-appimage.sh
File metadata and controls
28 lines (22 loc) · 856 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
set -ex
export ARCH=$(uname -m)
REPO="https://api.github.com/repos/ruffle-rs/ruffle/releases"
APPIMAGETOOL="https://github.com/pkgforge-dev/appimagetool-uruntime/releases/download/continuous/appimagetool-$ARCH.AppImage"
UPINFO="gh-releases-zsync|$(echo $GITHUB_REPOSITORY | tr '/' '|')|latest|*$ARCH.AppImage.zsync"
# ruffle uses amd64 instead of x86_64
tarball_url=$(wget "$REPO" -O - | sed 's/[()",{} ]/\n/g' \
| grep -oi "https.*linux-$ARCH.tar.gz$" | head -1)
export VERSION=$(echo "$tarball_url" | awk -F'/' '{print $(NF-1); exit}')
echo "$VERSION" > ~/version
mkdir ./AppDir && (
cd ./AppDir
wget "$tarball_url" -O ./package.tar.gz
tar xvf ./package.tar.gz
rm -f ./package.tar.gz
ln -s ruffle ./AppRun
cp -v ./extras/* ./
)
wget "$APPIMAGETOOL" -O ./appimagetool
chmod +x ./appimagetool
./appimagetool -n -u "$UPINFO" ./AppDir