forked from spwhitton/git-remote-gcrypt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuninstall.sh
More file actions
40 lines (31 loc) · 946 Bytes
/
uninstall.sh
File metadata and controls
40 lines (31 loc) · 946 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh
set -e
: "${prefix:=/usr/local}"
: "${DESTDIR:=}"
verbose() { echo "$@" >&2 && "$@"; }
BIN_PATH="$DESTDIR$prefix/bin/git-remote-gcrypt"
MAN_PATH="$DESTDIR$prefix/share/man/man1/git-remote-gcrypt.1.gz"
echo "Uninstalling git-remote-gcrypt..."
if [ -f "$BIN_PATH" ]; then
verbose rm -f "$BIN_PATH"
echo "Removed binary: $BIN_PATH"
else
echo "Binary not found: $BIN_PATH"
fi
if [ -f "$MAN_PATH" ]; then
verbose rm -f "$MAN_PATH"
echo "Removed man page: $MAN_PATH"
else
echo "Man page not found: $MAN_PATH"
fi
# Completions
COMP_BASH="$DESTDIR$prefix/share/bash-completion/completions/git-remote-gcrypt"
COMP_ZSH="$DESTDIR$prefix/share/zsh/site-functions/_git-remote-gcrypt"
COMP_FISH="$DESTDIR$prefix/share/fish/vendor_completions.d/git-remote-gcrypt.fish"
for f in "$COMP_BASH" "$COMP_ZSH" "$COMP_FISH"; do
if [ -f "$f" ]; then
verbose rm -f "$f"
echo "Removed completion: $f"
fi
done
echo "Uninstallation complete."