-
Notifications
You must be signed in to change notification settings - Fork 0
/
minify.sh
72 lines (58 loc) · 2.44 KB
/
minify.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/usr/bin/env bash
echo "minify image process initialized"
npm i easy-image-resizer --global
if [ ! -d "./assets/min" ]; then
mkdir assets/min
fi
echo "logo"
if [ ! -d "./assets/min/logo" ]; then
mkdir assets/min/logo
fi
resize-image -i ./assets/logo/brand-logo.png -o ./assets/min/logo/brand-logo.min.png -h 200
echo "logo"
if [ ! -d "./assets/min/logo/light" ]; then
mkdir assets/min/logo/light
fi
resize-image -i ./assets/logo/light/inline.png -o ./assets/min/logo/light/inline.min.png -h 400
echo "logo"
if [ ! -d "./assets/min/logo/dark" ]; then
mkdir assets/min/logo/dark
fi
resize-image -i ./assets/logo/dark/inline.png -o ./assets/min/logo/dark/inline.min.png -h 400
echo "wallpaper"
if [ ! -d "./assets/min/wallpaper" ]; then
mkdir assets/min/wallpaper
fi
echo "wallpaper"
if [ ! -d "./assets/min/wallpaper/inline" ]; then
mkdir assets/min/wallpaper/inline
fi
echo "wallpaper"
if [ ! -d "./assets/min/wallpaper/inline/branches" ]; then
mkdir assets/min/wallpaper/inline/branches
fi
resize-image -i ./assets/wallpaper/inline/branches/color.png -o ./assets/min/wallpaper/inline/branches/color.min.png -h 400
resize-image -i ./assets/wallpaper/inline/branches/dark.png -o ./assets/min/wallpaper/inline/branches/dark.min.png -h 400
resize-image -i ./assets/wallpaper/inline/branches/light.png -o ./assets/min/wallpaper/inline/branches/light.min.png -h 400
echo "wallpaper"
if [ ! -d "./assets/min/wallpaper/logo" ]; then
mkdir assets/min/wallpaper/logo
fi
echo "wallpaper"
if [ ! -d "./assets/min/wallpaper/logo/branches" ]; then
mkdir assets/min/wallpaper/logo/branches
fi
echo "wallpaper"
if [ ! -d "./assets/min/wallpaper/logo/branches/mobile" ]; then
mkdir assets/min/wallpaper/logo/branches/mobile
fi
resize-image -i ./assets/wallpaper/logo/branches/mobile/color.png -o ./assets/min/wallpaper/logo/branches/mobile/color.min.png -h 400
resize-image -i ./assets/wallpaper/logo/branches/mobile/dark.png -o ./assets/min/wallpaper/logo/branches/mobile/dark.min.png -h 400
resize-image -i ./assets/wallpaper/logo/branches/mobile/light.png -o ./assets/min/wallpaper/logo/branches/mobile/light.min.png -h 400
echo "badges"
if [ ! -d "./assets/min/badge" ]; then
mkdir assets/min/badge
fi
resize-image -i ./assets/badge/business-partner-light.png -o ./assets/min/badge/business-partner-light.min.png -h 200
resize-image -i ./assets/badge/business-partner-dark.png -o ./assets/min/badge/business-partner-dark.min.png -h 200
echo "minify image process completed"