Can't I go one week without having to uninstall and reinstall the damn deb file?

you are viewing a single comment's thread
view the rest of the comments
[–] 10 points 2 years ago (7 children)

I used this every time (with sudo):

#!/bin/sh
[ "$USER" != root ] && { sudo "$0" && exit; }
latest_version=$(
  curl -sI 'https://discord.com/api/download?platform=linux&format=deb' \
  | grep '^location:' \
  | grep -m 1 -oP '\d[\d.]+\d' \
  | head -n 1
)
sed -i.bak 's/\(version.*\)[0-9]\+\.[0-9]\+\.[0-9]\+/\1'"$latest_version"'/' \
  '/usr/share/discord/resources/build_info.json'

Let's see how good the Flatpak version will be.

  • source
  • hideshow 7 child comments
  • [–] [S] 13 points 2 years ago (4 children)

    just fyi I moved Discord, GIMP, Obsidian, and OBS over to flatpak and my root partition jumped from 19GB to 23GB. I'm kinda sad about it tbh

  • source
  • parent
  • hideshow 4 child comments
  • [–] 8 points 2 years ago*

    Most storage space viewers get confused by Flatpak's heavily deduplicated and compressed files, leading to them reporting way larger space than what's actually occupied on the hard drive.

  • source
  • parent
  • [–] 6 points 2 years ago (1 child)

    4GB ain't to cry over, you already saved so much not using Windows :p

  • source
  • parent
  • hideshow 1 child comment
  • [–] [S] 1 point 2 years ago

    It's true lol. I had to install Docker for teaching on my old drive and that instantly maxed out my root partition even when I kept deleting intermediate builds and unused data. Now I have this fun paranoia for all apps :)

  • source
  • parent
  • [–] 2 points 2 years ago (1 child)

    Can you break the sed command down for us sed newbies? The '-i.bak' thing is throwing me off

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 2 years ago

    Normally sed just passes along the edited text to STDout (printing in the terminal usually).

    With the -i option it actually changes the input files. If you add an extension immediately after the -i it apparently makes a backup of the original with that extension.

  • source
  • parent