Skip to content

Conversation

@snappyapple632
Copy link

@snappyapple632 snappyapple632 commented Jun 30, 2024

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 | bash in the terminal.
The wiki will be updated to reflect this new method of installation.

To do:
Attain feature parity with the current PowerShell script

@Moire9
Copy link

Moire9 commented Jan 8, 2025

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.

@NanashiTheNameless
Copy link

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

@snappyapple632
Copy link
Author

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
Copy link

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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sudo rm app.asar
sudo rm app.asar.bak

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link

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

Copy link

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

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

Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants