💄 Added simple arg check and reformatted

This commit is contained in:
z3rOR0ne 2022-12-20 00:36:21 -08:00
parent 6bd4aee6e6
commit c3d50af36e

View file

@ -30,7 +30,7 @@ EOM
}
hex_to_rgb() {
: "${1/\#}"
: "${1/\#/}"
((r = 16#${_:0:2}, g = 16#${_:2:2}, b = 16#${_:4:2}))
printf '%s\n' "rgba($r, $g, $b)"
}
@ -57,6 +57,10 @@ dependencycheck() {
}
main() {
if [[ "$#" -lt 1 ]]; then
printhelp
fi
while getopts ":x:r:?" arg; do
case $arg in
x)