forked from jsmitar/dolphin-folder-color
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·45 lines (30 loc) · 1.45 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
#!/bin/bash
foldercolorDE='plasma-folder-color.desktop'
foldercolorSY='plasma-color-symbolic.desktop'
foldercolorSH='dolphin-folder-color'
ROOT_UID=0
Dest_dir=''
Exec_dir='/usr/bin/'
if [ "$UID" -eq "$ROOT_UID" ]; then
Dest_dir="/usr/share/kio/servicemenus"
rm "$Exec_dir/$foldercolorSH" "$Dest_dir/$foldercolorDE" "$Dest_dir/$foldercolorSY"
mkdir -p ${Dest_dir}
cp -f ./$foldercolorSH "$Exec_dir/$foldercolorSH"
cp -f ./$foldercolorSY "$Dest_dir/$foldercolorSY"
cp -f ./$foldercolorDE "$Dest_dir/$foldercolorDE"
chmod +x "$Exec_dir/$foldercolorSH"
chmod +x "$Dest_dir/$foldercolorSY"
chmod +x "$Dest_dir/$foldercolorDE"
echo 'INSTALLED IN $ROOT DIRECTORY'
else
Dest_dir="$HOME/.local/share/kio/servicemenus"
rm "$Dest_dir/$foldercolorSH" "$Dest_dir/$foldercolorDE" "$Dest_dir/$foldercolorSY"
mkdir -p ${Dest_dir}
sudo cp -f "./$foldercolorSH" "$Exec_dir/$foldercolorSH"
sudo chmod +x "$Exec_dir/$foldercolorSH"
cp -f ./$foldercolorSY "$Dest_dir/$foldercolorSY"
cp -f ./$foldercolorDE "$Dest_dir/$foldercolorDE"
chmod +x "$Dest_dir/$foldercolorSY"
chmod +x "$Dest_dir/$foldercolorDE"
echo 'INSTALLED IN $USER DIRECTORY'
fi