Skip to content
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

upgrade_only glitches #65

Open
leapfog opened this issue Dec 1, 2022 · 3 comments
Open

upgrade_only glitches #65

leapfog opened this issue Dec 1, 2022 · 3 comments

Comments

@leapfog
Copy link

leapfog commented Dec 1, 2022

The following config file

[global]
  target = "~/bin"
  upgrade_only = true

["fatedier/frp"]
   all = true

["zyedidia/eget"]

["zyedidia/micro"]

used with the command eget -D will re-download frpc and frps every time.

Same is, when all = true is replaced with file = "frpc". (OK, not exactly the same, as only frpc is downloaded).

@leapfog
Copy link
Author

leapfog commented Dec 1, 2022

I guess it's because the "outer" (archive file's) timestamp obviously is newer than the "inner" (binary's) timestamp within the archive. Maybe that could be worked around by setting the binary's timestamp to the archive's one?

@leapfog
Copy link
Author

leapfog commented Dec 9, 2022

Seems --upgrade-only also isn't working with --download-only. The following command re-downloads Ventoy:

eget --download-only --to /tmp --upgrade-only ventoy/Ventoy

@dflock
Copy link

dflock commented Apr 15, 2023

Given this config:

[global]
target = "~/bin"
upgrade_only = true

when I run this command:

$ eget BurntSushi/ripgrep

eget always downloads & updates ripgrep, every time:

$ eget BurntSushi/ripgrep

https://github.com/BurntSushi/ripgrep/releases/download/13.0.0/ripgrep-13.0.0-x86_64-unknown-linux-musl.tar.gz
Downloading 100% [==============================================================================================================================================================] (2.0/2.0 MB, 17.526 MB/s)        
Extracted `ripgrep-13.0.0-x86_64-unknown-linux-musl/rg` to `/home/duncan/bin/rg`

$ eget BurntSushi/ripgrep

https://github.com/BurntSushi/ripgrep/releases/download/13.0.0/ripgrep-13.0.0-x86_64-unknown-linux-musl.tar.gz
Downloading 100% [==============================================================================================================================================================] (2.0/2.0 MB, 17.526 MB/s)        
Extracted `ripgrep-13.0.0-x86_64-unknown-linux-musl/rg` to `/home/duncan/bin/rg`

but for lots of other things, updating only updates when needed - for example starship works fine:

$ eget starship/starship --asset ^musl

https://github.com/starship/starship/releases/download/v1.14.2/starship-x86_64-unknown-linux-gnu.tar.gz
Downloading 100% [===============================================================================================================================================================] (3.4/3.4 MB, 7.994 MB/s)        
Checksum verified with starship-x86_64-unknown-linux-gnu.tar.gz.sha256
Extracted `starship` to `/home/duncan/bin/starship`

$ eget starship/starship --asset ^musl
requested release is not more recent than current version

This is my update-eget.sh and update_only works fine with everything, apart from rg, cascadia-code & rclone:

#!/usr/bin/env bash

cd ~/bin || exit

echo -e "\nUpdating eget..."
eget zyedidia/eget
echo -e "\nUpdating micro..."
eget zyedidia/micro --asset static
echo -e "\nUpdating pandoc..."
eget jgm/pandoc
echo -e "\nUpdating fzf..."
eget junegunn/fzf
echo -e "\nUpdating exa..."
eget ogham/exa --asset ^musl
echo -e "\nUpdating starship..."
eget starship/starship --asset ^musl
echo -e "\nUpdating rg..."
eget BurntSushi/ripgrep
echo -e "\nUpdating bat..."
eget sharkdp/bat --asset ^musl
echo -e "\nUpdating btop..."
eget aristocratos/btop
echo -e "\nUpdating duf..."
eget muesli/duf --asset x86_64.tar.gz
echo -e "\nUpdating caddy..."
eget caddyserver/caddy --asset amd64.tar.gz --asset ^.sig
echo -e "\nUpdating vale..."
eget errata-ai/vale --asset 64-bit.tar
echo -e "\nUpdating lapce..."
eget lapce/lapce --asset Lapce-linux.tar.gz
echo -e "\nUpdating pdftilecut..."
eget oxplot/pdftilecut
echo -e "\nUpdating tealdeer..."
eget dbrgn/tealdeer
echo -e "\nUpdating cascadia-code font..."
eget microsoft/cascadia-code --file=ttf/*.ttf --all --to ~/.fonts

echo -e "\nUpdating rclone..."
sudo /home/duncan/bin/eget rclone/rclone --asset amd64.zip --to /usr/bin

Afaik, upgrade_only doesn't work with --to, so the only one that doesn't work as expected is ripgrep, for me.

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

No branches or pull requests

2 participants