-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.sh
executable file
·120 lines (95 loc) · 2.09 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#!/usr/bin/env bash
# Welcome the user
echo ""
echo "Thanks for trying Kronicle!"
# Epmty 'echos' in order to create like break, for elegance : )
echo ""
sleep 1
echo "Starting installation..."
sleep 1
# Check the existence of the required directories, if they don't exist, create them
DIR="$HOME/.icons"
if [ -d "$DIR" ]; then
echo ""
echo "The '"$DIR"' directory already exists on your filesystem."
echo ""
sleep 1
echo "Proceeding..."
sleep 1
else
echo "The '"$DIR"' directory doesn't exist on your filesystem."
echo ""
echo "Creating one..."
echo ""
sleep 1
mkdir $HOME/.icons
sleep 1
fi
sleep 1
DIR="$HOME/.local/share/applications"
if [ -d "$DIR" ]; then
echo ""
echo "The '"$DIR"' directory already exists on your filesystem."
echo ""
sleep 1
echo "Proceeding..."
sleep 1
else
echo "The '"$DIR"' directory doesn't exist on your filesystem."
echo ""
echo "Creating one..."
sleep 1
mkdir $HOME/.local/share/applications
sleep 1
fi
sleep 1
DIR="$HOME/.bin"
if [ -d "$DIR" ]; then
echo ""
echo "The '"$DIR"' directory already exists on your filesystem."
echo ""
sleep 1
echo "Proceeding..."
sleep 1
else
echo "The '"$DIR"' directory doesn't exist on your filesystem."
echo ""
echo "Creating one..."
sleep 1
mkdir $HOME/.bin
sleep 1
fi
echo ""
echo "Copying files..."
cd $HOME/kronicle
# Copy the main userspace files
echo ""
cp -v kronicle.png $HOME/.icons/
echo ""
cp -v Kronicle.desktop $HOME/.local/share/applications/
echo ""
# Copy the main root files
sudo cp -v $HOME/kronicle/target/debug/kronicle /usr/local/bin/
echo ""
sleep 1
sudo chmod u+x --verbose /usr/local/bin/kronicle
echo ""
sleep 1
sudo cp -v kronicle-jobs $HOME/.bin/
echo ""
sleep 1
sudo cp -v kronicle.service /lib/systemd/system/
echo ""
sleep 1
echo "Enabling and start the Kronicle service..."
echo ""
sudo systemctl enable kronicle.service
echo ""
sleep 1
sudo systemctl start kronicle.service
sleep 2
echo "Done!"
echo ""
sleep 1
echo "Kronicle is installed on your system! Enjoy!"
echo ""