-
Notifications
You must be signed in to change notification settings - Fork 1
/
termux_install.sh
executable file
·66 lines (57 loc) · 954 Bytes
/
termux_install.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/sh
###
# Script for installing tekstitv in termux
# Usage:
# ./termux_install.sh [option]
# Options:
# install install the program [default]
# reinstall rebuild from scratch and install
# update fetch the latest changes and install
# uninstall remove installed binary
##
set -e
dependency() {
pkg install ncurses libcurl
}
install() {
dependency
./configure --disable-lib-build --termux-build
make
CPWD=`pwd`
cd ~
cp "$CPWD/build/tekstitv" ../usr/bin
cd $CPWD
exit 0
}
update() {
git pull
install
}
reinstall() {
make clean
install
}
uninstall() {
CPWD=`pwd`
cd ~
rm ../usr/bin/tekstitv
cd $CPWD
exit 0
}
# check the option
case "$1" in
"update")
update
;;
"install")
install
;;
"reinstall")
reinstall
;;
"uninstall")
uninstall
;;
esac
# Install by default
install