-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·64 lines (58 loc) · 1.67 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
#!/bin/bash
mkdir -p ~/.local/share/nautilus/scripts
PLACES_FILE=./PlacesIconChooser.py
APPS_FILE=./AppsIconChooser.py
move () {
echo "MOVE"
rm ~/.local/share/nautilus/scripts/PlacesIconChooser.py
if ! [ -f "$PLACES_FILE" ]; then
wget https://raw.githubusercontent.com/DenysMb/IconChanger/master/PlacesIconChooser.py -P ~/.local/share/nautilus/scripts
else
mv PlacesIconChooser.py ~/.local/share/nautilus/scripts
fi
rm ~/.local/share/nautilus/scripts/AppsIconChooser.py
if ! [ -f "$APPS_FILE" ]; then
wget https://raw.githubusercontent.com/DenysMb/IconChanger/master/AppsIconChooser.py -P ~/.local/share/nautilus/scripts
else
mv AppsIconChooser.py ~/.local/share/nautilus/scripts
fi
}
link () {
echo "LINK"
if ! [ -f "$PLACES_FILE" ]; then
wget https://raw.githubusercontent.com/DenysMb/IconChanger/master/PlacesIconChooser.py
fi
if ! [ -f "$APPS_FILE" ]; then
wget https://raw.githubusercontent.com/DenysMb/IconChanger/master/AppsIconChooser.py
fi
rm ~/.local/share/nautilus/scripts/PlacesIconChooser.py
ln ./PlacesIconChooser.py ~/.local/share/nautilus/scripts/PlacesIconChooser.py
rm ~/.local/share/nautilus/scripts/AppsIconChooser.py
ln ./AppsIconChooser.py ~/.local/share/nautilus/scripts/AppsIconChooser.py
}
if [ $# = 0 ]; then
move
else
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
-l|--link)
link
shift
;;
-m|--move)
move
shift
;;
*) # unknown option
echo "DEFAULT"
POSITIONAL+=("$1") # save it in an array for later
shift
;;
esac
done
set -- "${POSITIONAL[@]}" # restore positional parameters
fi
chmod +x ~/.local/share/nautilus/scripts/PlacesIconChooser.py
chmod +x ~/.local/share/nautilus/scripts/AppsIconChooser.py