-
Notifications
You must be signed in to change notification settings - Fork 7
/
INSTALL
executable file
·82 lines (74 loc) · 2.49 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 icon themes
# 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
echo
read -p "What distributor logo would you use ? [A]rchlinux, [D]ebian, [f]edora, [F]rugalware, [G]entoo, [L]inux Mint, [O]pensuse, [M]andriva, [S]lackware, [U]buntu, [u]ruk, : " distro
distro="${input:-$distro}"
case $distro in
[Aa]* ) distributor="archlinux";;
[Dd]* ) distributor="debian";;
[f]* ) distributor="fedora";;
[F]* ) distributor="frugalware";;
[Gg]* ) distributor="gentoo";;
[Ll]* ) distributor="linux-mint";;
[Oo]* ) distributor="opensuse";;
[Mm]* ) distributor="mandriva";;
[Ss]* ) distributor="slackware";;
[U]* ) distributor="ubuntu";;
[u]* ) distributor="uruk";;
* ) echo "Wrong value: installaton aborted."; exit 1;;
esac
iconname="$distributor"
cd ./masalla/apps/scalable/ && ln -sf ./$iconname.svg distributor-logo.svg && cd ../../..
for size in 48x48 24x24 22x22; do
cd ./masalla/apps/$size/ && ln -sf ./$iconname.svg distributor-logo.svg && cd ../../..
done
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 2>/dev/null; rm -Rf $HOME/.icons/masalla-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 2>/dev/null; rm -Rf /usr/share/icons/masalla-dark 2>/dev/null;;
* ) ;;
esac
echo
fi
./CLEAN
cp -R ./masalla /usr/share/icons/
cp -R ./masalla-dark /usr/share/icons/
install_dir=/usr/share/icons/
else
./CLEAN
cp -R ./masalla $HOME/.icons/
cp -R ./masalla-dark $HOME/.icons/
install_dir=$HOME/.icons/
fi
echo
echo "Installation complete. Enjoy !"
exit 0