فهرست منبع

fzf: now pull latest tag

mramthun 1 هفته پیش
والد
کامیت
0106f4fdf3
1فایلهای تغییر یافته به همراه5 افزوده شده و 4 حذف شده
  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