Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save drizzt/f95444586650f07444b03058a96d2de9 to your computer and use it in GitHub Desktop.
Save drizzt/f95444586650f07444b03058a96d2de9 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -euo pipefail
LEDGER_LIVE_DESKTOP_VERSION=${1:-1.0.2}
TMPDIR=$(mktemp -d)
trap 'rm -rf "$TMPDIR"' EXIT
cd "$TMPDIR"
# Download AppImages
curl -fOL "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
curl -fOL "https://github.com/LedgerHQ/ledger-live-desktop/releases/download/v$LEDGER_LIVE_DESKTOP_VERSION/ledger-live-desktop-$LEDGER_LIVE_DESKTOP_VERSION-linux-x86_64.AppImage"
chmod +x appimagetool-x86_64.AppImage ledger-live-desktop-"$LEDGER_LIVE_DESKTOP_VERSION"-linux-x86_64.AppImage
# Download libgssapi-krb5-2, libk5crypto3, libkrb5-3 and libkrb5support0 from Ubuntu 18.04
# FIXME Yes, it sux, but I don't care so much
for package in libgssapi-krb5-2 libk5crypto3 libkrb5-3 libkrb5support0; do
curl -s "https://packages.ubuntu.com/bionic/amd64/$package/download" | sed -n 's:\s*<li><a href="\([^"]*\)">.*:\1:p' | head -n1 | xargs -n1 curl -fOL
ar p "$package"_*_amd64.deb data.tar.xz | tar xvJf - ./usr/lib/x86_64-linux-gnu/
done
./ledger-live-desktop-"$LEDGER_LIVE_DESKTOP_VERSION"-linux-x86_64.AppImage --appimage-extract
cp -a usr/lib/x86_64-linux-gnu/*.so.* squashfs-root/usr/lib
./appimagetool-x86_64.AppImage squashfs-root "$OLDPWD/ledger-live-desktop-$LEDGER_LIVE_DESKTOP_VERSION-patched-linux-x86_64.AppImage"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment