forked from damienaicheh/icon-badge-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
entrypoint.sh
executable file
·90 lines (71 loc) · 1.58 KB
/
entrypoint.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/bin/sh -l
/app/bin/badge --version
COMMAND_LINE="/app/bin/badge "
if [ -z "$16" ];
then
if [ "$1" = true ];
then
COMMAND_LINE="$COMMAND_LINE --dark "
fi
if [ "$2" = true ];
then
COMMAND_LINE="$COMMAND_LINE --alpha "
fi
if [ "$3" = true ];
then
COMMAND_LINE="$COMMAND_LINE --alpha_channel "
fi
if [ ! -z "$4" ];
then
COMMAND_LINE="$COMMAND_LINE --custom "$4" "
fi
if [ "$5" = true ];
then
COMMAND_LINE="$COMMAND_LINE --no_badge "
fi
if [ ! -z "$6" ];
then
COMMAND_LINE="$COMMAND_LINE --badge_gravity "$6" "
fi
if [ ! -z "$7" ];
then
COMMAND_LINE="$COMMAND_LINE --shield "$7" "
fi
if [ ! -z "$8" ];
then
COMMAND_LINE="$COMMAND_LINE shield_gravity "$8" "
fi
if [ ! -z "$9" ];
then
COMMAND_LINE="$COMMAND_LINE --shield_parameters "$9" "
fi
if [ ! -z "$10" ];
then
COMMAND_LINE="$COMMAND_LINE --shield_geometry "$10" "
fi
if [ ! -z "$11" ];
then
COMMAND_LINE="$COMMAND_LINE --shield_io_timeout $11 "
fi
if [ ! -z "$12" ];
then
COMMAND_LINE="$COMMAND_LINE --shield_scale $12 "
fi
if [ "$13" = true ];
then
COMMAND_LINE="$COMMAND_LINE --shield_no_resize "
fi
if [ -n $14 ];
then
COMMAND_LINE="$COMMAND_LINE --glob ${14} "
fi
if [ "$15" = true ];
then
COMMAND_LINE="$COMMAND_LINE --grayscale "
fi
else
COMMAND_LINE="$COMMAND_LINE ${16}"
fi
echo Executed command:
echo $COMMAND_LINE
$COMMAND_LINE