If you are using discord
package from pacman
from time to time you get message that you need to download discord extract the package and replace existing /opt/discord
directory with new one.
This script is to automate this process. When you download discord archive (tar.gz
) from the discord prompt it will be placed in ~/Downloads
. This script will look for this archive, unpack it and place new archive in coorect place. Now discord should work when you open it again.
#!/bin/bash
NEW_DISORD_ARCHIVE=$(find ~/Downloads/ -name "discord-*.tar.gz" -printf '%T+ %p\n' | sort | tail -n 1 | cut -d' ' -f2)
DISCORD_LOCATION=/opt/discord
DISCORD_TMP_LOCATION=/tmp/Discord