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

  • Andrew@mander.xyz
    link
    fedilink
    arrow-up
    9
    ·
    1 year ago

    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.

    • graham1@gekinzuku.comOP
      link
      fedilink
      English
      arrow-up
      12
      ·
      1 year ago

      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

      • IverCoder@lemm.ee
        link
        fedilink
        English
        arrow-up
        7
        ·
        edit-2
        1 year 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.

      • Andrew@mander.xyz
        link
        fedilink
        arrow-up
        3
        arrow-down
        14
        ·
        1 year ago

        First of all, stop using legacy SI units for the size of information, they only bring confusion, instead use IEC/binary units like GiB. https://en.m.wikipedia.org/wiki/Binary_prefix

        Second of all, I know that with Flatpak’s ease of installation/runtime comes great size hit. It’s great that some layers are reusable, so it’s not a huge hit. Besides, with big disk size it’s not really a concern now is it?

      • azuth@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 year 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.