Last active
October 7, 2021 13:39
-
-
Save robiot/1b629535c747750df0218ee0247a90b0 to your computer and use it in GitHub Desktop.
Easy lunar client installer | Run with sudo
This file contains hidden or 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 | |
| pkgver=2.8.0 | |
| _pkgname=lunarclient | |
| _srcdir=/tmp/lunar | |
| _appimage="Lunar%20Client-${pkgver}.AppImage" | |
| _appname="Lunar Client-${pkgver}.AppImage" | |
| source="https://launcherupdates.lunarclientcdn.com/${_appimage}" | |
| rm -rf "${_srcdir}" | |
| mkdir -p ${_srcdir} | |
| cd ${_srcdir} | |
| wget ${source} | |
| chmod +x "${_appname}" | |
| ./"${_appname}" --appimage-extract | |
| sed -i -E "s|Exec=AppRun|Exec=env DESKTOPINTEGRATION=false /usr/bin/${_pkgname}|"\ | |
| "squashfs-root/${_pkgname}.desktop" | |
| chmod -R a-x+rX squashfs-root/usr | |
| # AppImage | |
| install -Dm755 "./${_appname}" "${pkgdir}/opt/${_pkgname}/${_pkgname}.AppImage" | |
| # Desktop file | |
| install -Dm644 "./squashfs-root/${_pkgname}.desktop"\ | |
| "${pkgdir}/usr/share/applications/${_pkgname}.desktop" | |
| # Icon images | |
| install -dm755 "${pkgdir}/usr/share/" | |
| cp -a "./squashfs-root/usr/share/icons" "${pkgdir}/usr/share/" | |
| # Symlink executable | |
| install -dm755 "${pkgdir}/usr/bin" | |
| ln -s "/opt/${_pkgname}/${_pkgname}.AppImage" "${pkgdir}/usr/bin/${_pkgname}" | |
| rm -rf "${_srcdir}" |
Author
robiot
commented
Oct 4, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment