Explorar o código

fzf: now pull latest tag

mramthun hai 1 semana
pai
achega
0106f4fdf3
Modificáronse 1 ficheiros con 5 adicións e 4 borrados
  1. 5 4
      10-fzf.sh

+ 5 - 4
10-fzf.sh

@@ -2,13 +2,14 @@
 
 set -e
 
-VERSION=0.67.0
+VERSION=$(curl -s https://api.github.com/repos/junegunn/fzf/releases/latest | jq -r '.name')
+echo "fzf version: $VERSION"
 TARBALL=fzf-$VERSION-linux_amd64.tar.gz
 
-curl -LO https://github.com/junegunn/fzf/releases/download/v$VERSION/$TARBALL
+curl -LO https://github.com/junegunn/fzf/releases/download/v"$VERSION"/"$TARBALL"
 
-tar -C "$HOME"/.local/bin -xzf $TARBALL
-rm $TARBALL
+tar -C "$HOME"/.local/bin -xzf "$TARBALL"
+rm "$TARBALL"
 
 echo 'eval "$($HOME/.local/bin/fzf --bash)"' > "$HOME"/.bashrc.d/fzf.sh