Created
July 16, 2018 09:33
-
-
Save drizzt/f95444586650f07444b03058a96d2de9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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