-
Notifications
You must be signed in to change notification settings - Fork 3
/
changecolors.sh
executable file
·51 lines (41 loc) · 1.43 KB
/
changecolors.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
#!/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`
echo -e "${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 Creator - A shell script for create colorful folders!\n"
folders=('22x22' '24x24' '32x32' '48x48' '64x64')
colors=('4f4f4f' 'e4e4e4' 'ffffff' 'cccccc')
newColors=('4f4f4f' 'e4e4e4' 'ffffff' 'cccccc')
echo -n "Enter the name of the variant: "
read colorName
echo
if [ ! -d "New Icons" ]; then
mkdir "New Icons";
echo "The New Icons folder was created!"
else
echo "The New Icons folder already exists!"
fi
echo
for folder in ${folders[*]}; do
if [ ! -e "New Icons"/$folder ]; then
mkdir "New Icons"/$folder;
echo "The $folder folder was created!"
else
echo "The $folder folder already exists!"
fi
done
echo
echo "Creating icons..."
for folder in ${folders[*]}; do
for icon in $(cat iconsNames.txt); do
cat "Base Icons"/$folder/$icon | sed -e "s/${colors[0]}/${newColors[0]}/" \
-e "s/${colors[1]}/${newColors[1]}/" \
-e "s/${colors[2]}/${newColors[2]}/" \
-e "s/${colors[3]}/${newColors[3]}/" > "New Icons"/$folder/` echo $icon | sed "s/white/$colorName/" `;
done
done
echo "The icons were created!"