-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathiconlinks.sh
More file actions
46 lines (35 loc) · 1.13 KB
/
iconlinks.sh
File metadata and controls
46 lines (35 loc) · 1.13 KB
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
#!/bin/sh
# This shell script installs symbolic links in icon theme directories
# $1 is the source directory
# $2 is the install directory
# Reference theme names
ref_theme1=xfe-theme
ref_theme2=gnome-theme
# Link theme names
link_theme1=windows-theme
link_theme2=gnomeblue-theme
link_theme3=tango-theme
link_theme4=kde-theme
echo Installing icon links...
# Loop on PNG files
for iconfile in $1/icons/$ref_theme1/*.png
do
# Get icon name
iconname=`basename "$iconfile"`
# Install a link if the icon does not exist in the source theme directory
if test ! -f $1/icons/$link_theme1/$iconname
then
echo ln -s -f ../$ref_theme1/$iconname $2/icons/$link_theme1/$iconname;
ln -s -f ../$ref_theme1/$iconname $2/icons/$link_theme1/$iconname
fi
if test ! -f $1/icons/$link_theme2/$iconname
then
echo ln -s -f ../$ref_theme2/$iconname $2/icons/$link_theme2/$iconname;
ln -s -f ../$ref_theme2/$iconname $2/icons/$link_theme2/$iconname
fi
if test ! -f $1/icons/$link_theme3/$iconname
then
echo ln -s -f ../$ref_theme2/$iconname $2/icons/$link_theme3/$iconname;
ln -s -f ../$ref_theme2/$iconname $2/icons/$link_theme3/$iconname
fi
done