Add automated installation script for Linux#185
Add automated installation script for Linux#185snappyapple632 wants to merge 7 commits intoGooseMod:mainfrom
Conversation
|
This script doesn't support installing into non-stable releases of Discord (e.g. ptb, canary, development). Luckily this is pretty easy to rectify, just some copy-pasting with slight modifications. |
|
or people could write their own oneliner like sudo wget --show-progress -O /usr/share/discord/resources/app.asar https://github.com/GooseMod/OpenAsar/releases/download/nightly/app.asar |
|
As the website stands right now, it requires Linux users to replace the asar manually, where Windows users have a PS script that takes care of everything. A one-liner might be fine if you already know where Discord is installed, but it's also nice not to have to commit that to memory with the script. |
| fi | ||
|
|
||
| sudo mv app.asar app.asar.bak | ||
| sudo wget --no-verbose https://github.com/GooseMod/OpenAsar/releases/download/nightly/app.asar |
There was a problem hiding this comment.
this script always installs with sudo, even if the installation is a user installed flatpak in the $HOME directory, installing files owned by root in a user's HOME is a bad idea
| echo | ||
|
|
||
| if [ -a "app.asar.bak" ]; then | ||
| sudo rm app.asar |
There was a problem hiding this comment.
| sudo rm app.asar | |
| sudo rm app.asar.bak |
There was a problem hiding this comment.
removing the non .bak app.asar is most definitely not what the script wants to be doing if the next line is mv app.asar app.asar.bak
There was a problem hiding this comment.
note that the mv would clobber the file anyway so we could just delete this just as well, I just thought to at least not have it destroy the current app.asar
There was a problem hiding this comment.
I would personally do if the .bak exists delete it, then copy (move) the original to the .bak ideally youd also want a way to backup the initial non-openasar too but that'd be more complicated
There was a problem hiding this comment.
I made my own basic bash script that does exactly that for myself, it just compares the file size, the non openasar .asar is huge so it's easy to tell them apart
The purpose of this script is to automate the tedious task of clicking back and forth between the OpenAsar website and your file explorer of choice figuring out which directory Discord is installed in.
Effectively, installation on Linux would be as simple as running
wget -q -O - https://raw.githubusercontent.com/GooseMod/OpenAsar/main/scripts/install-openasar.sh | bashin the terminal.The wiki will be updated to reflect this new method of installation.
To do:
Attain feature parity with the current PowerShell script