-
Notifications
You must be signed in to change notification settings - Fork 1
/
INSTALL
executable file
·82 lines (76 loc) · 3.82 KB
/
INSTALL
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
#!/bin/bash
# install script for masalla-colors
# Written by Hayder Majid (Hayder Ctee) <hayder@riseup.net> (thanks to Tiheum for writting his script :-) (matthieu.james@gmail.com) )
ROOT_UID=0
if [ "$UID" -ne "$ROOT_UID" ]
then
echo "Icon themes will be installed in $HOME/.icons. To make them available for all users, run this script as root."
else
echo "Icon themes will be installed in /usr/share/icons and are available for all users."
fi
read -p "Do you want to continue ? [Y]es, [N]o : " response
case $response in
[Yy]* ) ;;
[Nn]* ) exit 99;;
* ) echo "Wrong value: installaton aborted."; exit 1;;
esac
DIR="$( cd -P "$( dirname "$0" )" && pwd )"
cd $DIR
if [ -d $HOME/.icons/masalla- ]
then
echo
read -p "An existing installation have been detected in $HOME/.icons. Remove it previously ? [Y]es, [N]o :" response
case $response in
[Yy]* ) rm -Rf $HOME/.icons/masalla-red 2>/dev/null; rm -Rf $HOME/.icons/masalla-red-dark 2>/dev/null; rm -Rf $HOME/.icons/masalla-yellow 2>/dev/null; rm -Rf $HOME/.icons/masalla-black 2>/dev/null;rm -Rf $HOME/.icons/masalla-black-dark 2>/dev/null;rm -Rf $HOME/.icons/masalla-violet-dark 2>/dev/null;rm -Rf $HOME/.icons/masalla-violet 2>/dev/null;rm -Rf $HOME/.icons/masalla-brown-dark 2>/dev/null;rm -Rf $HOME/.icons/masalla-brown 2>/dev/null; rm -Rf $HOME/.icons/masalla-grey-dark 2>/dev/null; rm -Rf $HOME/.icons/masalla-grey 2>/dev/null; rm -Rf $HOME/.icons/masalla-green-dark 2>/dev/null; rm -Rf $HOME/.icons/masalla-green 2>/dev/null; rm -Rf $HOME/.icons/masalla-yellow-dark 2>/dev/null;;
* ) ;;
esac
fi
if [ "$UID" -eq "$ROOT_UID" ]
then
if [ -d /usr/share/icons/masalla- ]
then
echo
read -p "An existing installation has been detected in /usr/share/icons. Remove it previously ? [Y]es, [N]o :" response
case $response in
[Yy]* ) rm -Rf /usr/share/icons/masalla-red 2>/dev/null; rm -Rf /usr/share/icons/masalla-red-dark 2>/dev/null; rm -Rf /usr/share/icons/masalla-yellow 2>/dev/null; rm -Rf /usr/share/icons/masalla-black 2>/dev/null;rm -Rf /usr/share/icons/masalla-black-dark 2>/dev/null;rm -Rf /usr/share/icons/masalla-violet-dark 2>/dev/null;rm -Rf /usr/share/icons/masalla-violet 2>/dev/null;rm -Rf /usr/share/icons/masalla-brown-dark 2>/dev/null;rm -Rf /usr/share/icons/masalla-brown 2>/dev/null; rm -Rf /usr/share/icons/masalla-grey-dark 2>/dev/null; rm -Rf /usr/share/icons/masalla-grey 2>/dev/null; rm -Rf /usr/share/icons/masalla-green-dark 2>/dev/null; rm -Rf /usr/share/icons/masalla-green 2>/dev/null; rm -Rf /usr/share/icons/masalla-yellow-dark 2>/dev/null;;
* ) ;;
esac
echo
fi
./CLEAN
cp -R ./masalla-red/ /usr/share/icons/
cp -R ./masalla-red-dark/ /usr/share/icons/
cp -R ./masalla-yellow/ /usr/share/icons/
cp -R ./masalla-yellow-dark/ /usr/share/icons/
cp -R ./masalla-grey/ /usr/share/icons/
cp -R ./masalla-grey-dark/ /usr/share/icons/
cp -R ./masalla-green/ /usr/share/icons/
cp -R ./masalla-green-dark/ /usr/share/icons/
cp -R ./masalla-violet/ /usr/share/icons/
cp -R ./masalla-violet-dark/ /usr/share/icons/
cp -R ./masalla-brown/ /usr/share/icons/
cp -R ./masalla-brown-dark/ /usr/share/icons/
cp -R ./masalla-black/ /usr/share/icons/
cp -R ./masalla-black-dark/ /usr/share/icons/
install_dir=/usr/share/icons/
else
./CLEAN
cp -R ./masalla-red/ $HOME/.icons/
cp -R ./masalla-red-dark/ $HOME/.icons/
cp -R ./masalla-yellow/ $HOME/.icons/
cp -R ./masalla-yellow-dark/ $HOME/.icons/
cp -R ./masalla-grey/ $HOME/.icons/
cp -R ./masalla-grey-dark/ $HOME/.icons/
cp -R ./masalla-green/ $HOME/.icons/
cp -R ./masalla-green-dark/ $HOME/.icons/
cp -R ./masalla-violet/ $HOME/.icons/
cp -R ./masalla-violet-dark/ $HOME/.icons/
cp -R ./masalla-brown/ $HOME/.icons/
cp -R ./masalla-brown-dark/ $HOME/.icons/
cp -R ./masalla-black/ $HOME/.icons/
cp -R ./masalla-black-dark/ $HOME/.icons/
install_dir=$HOME/.icons/
fi
echo
echo "Installation complete. Enjoy !"
exit 0