-
Notifications
You must be signed in to change notification settings - Fork 3
/
install.sh
executable file
·56 lines (51 loc) · 1.76 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
#!/bin/bash
RED=`tput setaf 1`
GREEN=`tput setaf 2`
YELLOW=`tput setaf 3`
BLUE=`tput setaf 4`
PURPLE=`tput setaf 5`
LIGHTBLUE=`tput setaf 6`
RESET=`tput sgr0`
PREFIX="New Icons"
LOCAL="/usr/share/icons/Papirus"
echo -e "Welcome to ${RED}P${RED}${RESET}${YELLOW}a${YELLOW}${RESET}${GREEN}p${GREEN}${RESET}${BLUE}i${BLUE}${RESET}${PURPLE}r${PURPLE}${RESET}${RED}u${RED}${RESET}${LIGHTBLUE}s${LIGHTBLUE}${RESET} Folder Icon installer!"
echo -e "${YELLOW}WARNING${YELLOW}${RESET}: For better usage, run this script using root user!\n"
if [ ! $USER = "root" ]
then
if [ ! -d /home/$USER/.icons/Papirus ]
then
echo -e "${RED}Install first the papirus icon!${RED}${RESET}\n"
exit 0
else
echo -e "Papirus icon already installed!\n"
LOCAL = "/home/$USER/.icons/Papirus"
fi
else
if [ ! -d $LOCAL ]
then
echo -e "${RED}Install first the papirus icon!${RED}${RESET}\n"
exit 0
else
if [ ! -f /usr/bin/papirus-folders ]
then
echo "Papirus-folders script not is installed!"
cp papirus-folders /usr/bin/
echo -e "Papirus-folders script installed!\n"
else
echo "Papirus-folders already installed!"
echo "Appling patch in papirus-folders..."
diff -Naur /usr/bin/papirus-folders papirus-folders > Patch.patch
patch /usr/bin/papirus-folders < Patch.patch
rm -f Patch.patch
chmod 744 /usr/bin/papirus-folders
echo -e "Patch applied!\n"
fi
fi
fi
echo "Instaling icons..."
cp $PREFIX/64x64/* $LOCAL/64x64/places
cp $PREFIX/48x48/* $LOCAL/48x48/places
cp $PREFIX/32x32/* $LOCAL/32x32/places
cp $PREFIX/24x24/* $LOCAL/24x24/places
cp $PREFIX/22x22/* $LOCAL/22x22/places
echo "Icons installed!"