Skip to content

Commit f3f6e83

Browse files
committed
add git-delta
1 parent 10d76b8 commit f3f6e83

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "git-delta",
3+
"id": "git-delta",
4+
"version": "1.0.0",
5+
"description": "Install git-delta, a syntax-highlighting pager for git, diff, grep, and blame output",
6+
"options": {
7+
"version": {
8+
"type": "string",
9+
"description": "The git-delta version to install",
10+
"default": ""
11+
}
12+
}
13+
}

src/git-delta/install.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/sh
2+
3+
set -ex
4+
5+
get_architecture()
6+
{
7+
local uname_m="$(uname -m)"
8+
9+
case "${uname_m}" in
10+
x86_64)
11+
echo "amd64"
12+
;;
13+
arm64|aarch64)
14+
echo "arm64"
15+
;;
16+
arm)
17+
echo "armhf"
18+
;;
19+
*)
20+
echo >&2 "unsupported architecture: ${uname_m}"
21+
exit 1
22+
esac
23+
}
24+
25+
DELTA_VERSION="${VERSION:-0.18.2}"
26+
DELTA_ARCH="$(get_architecture)"
27+
DELTA_DOWNLOAD_URL="https://github.com/dandavison/delta/releases/download/${DELTA_VERSION}/git-delta_${DELTA_VERSION}_${DELTA_ARCH}.deb"
28+
29+
DELTA_PACKAGE_FILE="git-delta.deb"
30+
31+
curl -fsSL "${DELTA_DOWNLOAD_URL}" -o "${DELTA_PACKAGE_FILE}"
32+
# sudo dpkg -i "${DELTA_PACKAGE_FILE}"
33+
rm "${DELTA_PACKAGE_FILE}"

0 commit comments

Comments
 (0)