Skip to content

Commit

Permalink
More reliable method to get latest bat release
Browse files Browse the repository at this point in the history
  • Loading branch information
rajat2004 committed Jan 2, 2020
1 parent 00b751e commit 3341e79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 1-BasicSetUp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ cp ./config_files/xbindkeysrc ~/.xbindkeysrc

# Now download and install bat
spatialPrint "Installing bat, a handy replacement for cat"
latest_bat_setup=$(wget -q -O - https://github.com/sharkdp/bat/releases/ index.html | grep "deb" | head -n 1 | cut -d \" -f 2)
aria2c --file-allocation=none -c -x 10 -s 10 --dir /tmp -o bat.deb https://github.com${latest_bat_setup}
latest_bat_setup=$(curl --silent "https://api.github.com/repos/sharkdp/bat/releases/latest" | grep "deb" | grep "browser_download_url" | head -n 1 | cut -d \" -f 4)
aria2c --file-allocation=none -c -x 10 -s 10 --dir /tmp -o bat.deb $latest_bat_setup
execute sudo dpkg -i /tmp/bat.deb
execute sudo apt-get install -f

Expand Down

0 comments on commit 3341e79

Please sign in to comment.