-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathicons-symlink
executable file
·93 lines (82 loc) · 2.62 KB
/
icons-symlink
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
83
84
85
86
87
88
89
90
91
92
93
#!/bin/bash
#================================================
#================================================
# O.S. : Gnu Linux =
# Author : Cristian Pozzessere = ilnanny =
# D.A.Page : http://ilnanny.deviantart.com =
# Github : https://github.com/ilnanny =
#================================================
# This script creates new symlinks to existing icons
#====================================================
set -eo pipefail
SCRIPT_DIR=$(dirname "$0")
TARGET_DIR="$SCRIPT_DIR/Lila-HD"
usage() {
cat <<-EOF
This script creates new symlinks to existing icons.
Usage:
$0 context <symlink name> <icon name>
available contexts:
[a]ctions
[ap]ps
[d]evices
[e]mblems
[m]imetypes
[pl]aces
[s]tatus
Example:
$0 apps radiotray-ng-on radiotray.png
EOF
exit 2
}
[ -n "$3" ] || usage
CONTEXT="$1"
SYMLINK_NAME="${2%*.svg}"
TARGET_ICON="$3"
case "$CONTEXT" in
actions|ac*)
for size in '16x16' '16x16@2x' '22x22' '22x22@2x' '24x24' '24x24@2x'; do
ln -sfv "$TARGET_ICON" \
"$TARGET_DIR/${size}/actions/${SYMLINK_NAME}.png"
done
;;
apps|ap*)
for size in '16x16' '16x16@2x' '22x22' '22x22@2x' '24x24' '24x24@2x' '32x32' '32x32@2x' '48x48' '48x48@2x' '64x64' '64x64@2x' '512x512' '512x512@2x'; do
ln -sfv "$TARGET_ICON" \
"$TARGET_DIR/${size}/apps/${SYMLINK_NAME}.png"
done
;;
devices|d*)
for size in '16x16' '16x16@2x' '22x22' '22x22@2x' '24x24' '24x24@2x' '32x32' '32x32@2x' '48x48' '48x48@2x' '64x64' '64x64@2x' '512x512' '512x512@2x'; do
ln -sfv "$TARGET_ICON" \
"$TARGET_DIR/${size}/devices/${SYMLINK_NAME}.png"
done
;;
emblems|e*)
for size in '8x8' '8x8@2x' '16x16' '16x16@2x' '24x24' '24x24@2x' '32x32' '32x32@2x' '48x48' '48x48@2x' '64x64' '64x64@2x' '512x512' '512x512@2x'; do
ln -sfv "$TARGET_ICON" \
"$TARGET_DIR/${size}/emblems/${SYMLINK_NAME}.png"
done
;;
mimetypes|m*)
for size in '16x16' '16x16@2x' '24x24' '24x24@2x' '32x32' '32x32@2x' '48x48' '48x48@2x' '64x64' '64x64@2x' '512x512' '512x512@2x'; do
ln -sfv "$TARGET_ICON" \
"$TARGET_DIR/${size}/mimetypes/${SYMLINK_NAME}.png"
done
;;
places|pl*)
for size in '16x16' '16x16@2x' '24x24' '24x24@2x' '32x32' '32x32@2x' '48x48' '48x48@2x' '64x64' '64x64@2x' '512x512' '512x512@2x'; do
ln -sfv "$TARGET_ICON" \
"$TARGET_DIR/${size}/places/${SYMLINK_NAME}.png"
done
;;
status|s*)
for size in '16x16' '16x16@2x' '24x24' '24x24@2x' '32x32' '32x32@2x' '48x48' '48x48@2x' '64x64' '64x64@2x' '512x512' '512x512@2x'; do
ln -sfv "$TARGET_ICON" \
"$TARGET_DIR/${size}/status/${SYMLINK_NAME}.png"
done
;;
*)
usage
;;
esac