-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
50 lines (42 loc) · 938 Bytes
/
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
#!/bin/bash
# termux-gdrive-backup
# an automated android backup system
# script created by christian garcia
# check if the package already exist
check_package() {
if ! dpkg -s "$1" &> /dev/null; then
return 1
else
return 0
fi
}
# install required packages
# handling package existence
# start Installing
echo "----- start -----"
# install rclone
install_rclone() {
if ! check_package "rclone"; then
echo "<<<<< Installing rclone... >>>>>"
pkg install rclone -y
else
echo "===== rclone is already installed ====="
fi
}
# install cronie
install_cronie() {
if ! check_package "cronie"; then
echo "<<<<< Installing cronie... >>>>>"
pkg install cronie -y
else
echo "===== cronie is already installed ====="
fi
}
# install packages
install_packages() {
install_rclone
install_cronie
}
# call function to install
install_packages
echo "----- package installation completed. -----"