-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinstall.sh
executable file
·66 lines (46 loc) · 1.39 KB
/
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/bash
# Copyright (C) 2015, 2019 Rafael Senties Martinelli
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License 3 as published by
# the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Set the scripts permissions
#
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd "$DIR" || (echo "problem in cd" && exit)
if [ "$EUID" -ne 0 ]
then echo "Please run as root."
exit
fi
#
# Remove previous versions
#
echo -e "\e[00;32mRemoving previous versions..\e[00m"
chmod a+x ./remove
./remove -s
#
# Start the installation
#
echo -e "\e[00;32m\nInstalling the software files...\e[00m"
function install_files(){
echo "installing: $1"
install -d "$1"
install -D "$DIR$1"/* "$1"
}
install_files "/usr/bin"
install_files "/usr/share/doc/build-deb"
install_files "/usr/share/man/man8"
#
# End
#
echo -e "\e[00;32m\nThe installation is complete.\e[00m"