-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·52 lines (36 loc) · 1.38 KB
/
setup.sh
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
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/sh
[ -z $PREFIX ] && \
PREFIX=/usr/local
[ -z $BIN_DIR ] && \
BIN_DIR=$DESTDIR$PREFIX/bin
[ -z $LICENSE_DIR ] && \
LICENSE_DIR=$DESTDIR$PREFIX/share/licenses/minlau
[ -z $ZSH_COMPLETION_DIR ] && \
ZSH_COMPLETION_DIR=$DESTDIR$PREFIX/share/zsh/site-functions
[ -z $BASH_COMPLETION_DIR ] && \
BASH_COMPLETION_DIR=$DESTDIR$PREFIX/share/bash-completion/completions
[ -z $MAN_DIR ] && \
MAN_DIR=$DESTDIR$PREFIX/share/man/man1
if [ "$1" = "install" ]; then
echo "install -Dm755 src/minlau "$BIN_DIR/minlau""
install -Dm755 src/minlau "$BIN_DIR/minlau"
echo "install -Dm644 LICENSE "$LICENSE_DIR/LICENSE""
install -Dm644 LICENSE "$LICENSE_DIR/LICENSE"
echo "install -Dm644 completion/zsh/_minlau "$ZSH_COMPLETION_DIR/_minlau""
install -Dm644 completion/zsh/_minlau "$ZSH_COMPLETION_DIR/_minlau"
echo "install -Dm644 completion/bash/minlau "$BASH_COMPLETION_DIR/minlau""
install -Dm644 completion/bash/minlau "$BASH_COMPLETION_DIR/minlau"
echo "install -Dm644 minlau.1 "$MAN_DIR/minlau.1""
install -Dm644 minlau.1 "$MAN_DIR/minlau.1"
elif [ "$1" = "uninstall" ]; then
echo "rm "$BIN_DIR/minlau""
rm "$BIN_DIR/minlau"
echo "rm -r "$LICENSE_DIR""
rm -r "$LICENSE_DIR"
echo "rm "$ZSH_COMPLETION_DIR/_minlau""
rm "$ZSH_COMPLETION_DIR/_minlau"
echo "rm "$BASH_COMPLETION_DIR/minlau""
rm "$BASH_COMPLETION_DIR/minlau"
echo "rm "$MAN_DIR/minlau.1""
rm "$MAN_DIR/minlau.1"
fi