💄 Added simple arg check and reformatted
This commit is contained in:
parent
6bd4aee6e6
commit
c3d50af36e
1 changed files with 10 additions and 6 deletions
|
|
@ -30,7 +30,7 @@ EOM
|
||||||
}
|
}
|
||||||
|
|
||||||
hex_to_rgb() {
|
hex_to_rgb() {
|
||||||
: "${1/\#}"
|
: "${1/\#/}"
|
||||||
((r = 16#${_:0:2}, g = 16#${_:2:2}, b = 16#${_:4:2}))
|
((r = 16#${_:0:2}, g = 16#${_:2:2}, b = 16#${_:4:2}))
|
||||||
printf '%s\n' "rgba($r, $g, $b)"
|
printf '%s\n' "rgba($r, $g, $b)"
|
||||||
}
|
}
|
||||||
|
|
@ -57,6 +57,10 @@ dependencycheck() {
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
|
if [[ "$#" -lt 1 ]]; then
|
||||||
|
printhelp
|
||||||
|
fi
|
||||||
|
|
||||||
while getopts ":x:r:?" arg; do
|
while getopts ":x:r:?" arg; do
|
||||||
case $arg in
|
case $arg in
|
||||||
x)
|
x)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue