summaryrefslogtreecommitdiffstatshomepage
path: root/bat/install
diff options
context:
space:
mode:
authorToby Vincent <tobyv13@gmail.com>2021-11-14 17:09:26 -0600
committerToby Vincent <tobyv13@gmail.com>2021-11-14 17:09:26 -0600
commit6f2c6c43b811f06e382e3e6157c750c4b26a9638 (patch)
tree6e1e096fa503acd37fdf44ea754dcbb11f6874d4 /bat/install
parent71b95c15da8b9e88107602cebc757089f3df912f (diff)
revert: removed unused scripts
Diffstat (limited to 'bat/install')
-rwxr-xr-xbat/install51
1 files changed, 0 insertions, 51 deletions
diff --git a/bat/install b/bat/install
deleted file mode 100755
index 6f20f5e..0000000
--- a/bat/install
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/usr/bin/env bash
-
-# general installer for sharkdp's rust based applications
-
-USAGE="Usage: ${0##*/} <app>"
-APPS="Apps: bat, hyperfine, hexyl, fd, vivid, pastel, lscolors, diskus"
-
-app=$1
-
-if [[ -z $app || $app == "help" ]]; then
- echo $USAGE >&2
- echo $APPS >&2
- exit 0
-fi
-
-if [[ "$app" == "list" ]]; then
- echo $USAGE >&2
- exit 0
-fi
-
-if [ ! "$(which $app)" ]; then
- current_version=0.0.0
- echo "$app: not installed"
-else
- current_version=$($app --version | grep -oE "[0-9\.]+")
- echo "$app: found $current_version"
-fi
-
-latest_version=$(curl -s "https://github.com/sharkdp/${app}/releases/latest" | grep -oE '[0-9]+.[0-9\.]+')
-
-if [ "$2" ]; then
- latest_version=$2
-fi
-
-if [[ "$current_version" == "$latest_version" ]]; then
- echo "$app: up-to-date"
-else
- echo "$app: new version found $latest_version"
- echo "$app: downloading..."
-
- arch="$(uname -m)"
- filename="${app}-v${latest_version}-${arch}-unknown-linux-musl"
-
- curl -fsSLo "${filename}.tar.gz" "https://github.com/sharkdp/${app}/releases/download/v${latest_version}/${filename}.tar.gz"
- tar -zxvf "${filename}.tar.gz" "${filename}/${app}"
-
- mv "${filename}/${app}" "${HOME}/.local/bin/"
-
- rm -r "${filename}"
- rm "${filename}.tar.gz"
-fi