-
-
Notifications
You must be signed in to change notification settings - Fork 80
Add automated installation script for Linux #185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| sudo rm app.asar | |
| sudo rm app.asar.bak |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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