This commit is contained in:
tavo 2025-01-07 14:07:38 -06:00
parent f9019bc050
commit 2a1352f6e0
Signed by: tavo
GPG key ID: D490F27B624CECB0
2 changed files with 37 additions and 0 deletions

1
.gitignore vendored
View file

@ -254,3 +254,4 @@ glow/
heroic/
kwinoutputconfig.json
plasmaparc
bruno/

36
wrappers/bruno Executable file
View file

@ -0,0 +1,36 @@
#!/bin/sh
BRUNO_PATH="$HOME/.local/share/bruno"
if ! [ -d "$BRUNO_PATH" ] ; then
mkdir -p "$BRUNO_PATH"
fi
LATEST="$(curl -s https://api.github.com/repos/usebruno/bruno/releases/latest |
grep '"name":.*\.AppImage' | cut -d'"' -f 4)"
for v in "$BRUNO_PATH"/*.AppImage ; do
INSTALLED="${v##*/}"
unset v
done
if [ "$INSTALLED" != "$LATEST" ] ; then
opt="$(printf 'Yes\nNo\n' | menu "Newer bruno version available, update?")"
if [ "$opt" = "Yes" ] ; then
echo "Updating bruno..."
if ! curl -L --progress-bar -o "$BRUNO_PATH/$LATEST" \
https://github.com/usebruno/bruno/releases/latest/download/"$LATEST" ; then
echo "Error updating bruno"
exit 1
fi
chmod +x "$BRUNO_PATH/$LATEST"
INSTALLED="$LATEST"
fi
unset opt
fi
exec "$BRUNO_PATH/$INSTALLED"