Adding new rates.sx feature to cryptocurrency
This commit is contained in:
parent
bb2103081d
commit
40df20fb85
|
@ -254,11 +254,14 @@ EOF
|
|||
|
||||
|
||||
|
||||
while getopts "of:uvh" opt; do
|
||||
while getopts "c:of:uvh" opt; do
|
||||
case "$opt" in
|
||||
\?) echo "Invalid option: -$OPTARG" >&2
|
||||
exit 1
|
||||
;;
|
||||
c)
|
||||
currency=$OPTARG
|
||||
;;
|
||||
h) usage
|
||||
exit 0
|
||||
;;
|
||||
|
@ -305,8 +308,13 @@ fi
|
|||
|
||||
getConfiguredClient || exit 1
|
||||
checkInternet || exit 1
|
||||
link="rate.sx"
|
||||
if [[ $fiat =~ [a-zA-Z] ]]; then
|
||||
httpGet $fiat.rate.sx
|
||||
else
|
||||
httpGet rate.sx
|
||||
link="$fiat.$link"
|
||||
fi
|
||||
|
||||
if [[ $currency =~ [a-zA-Z] ]]; then
|
||||
link="$link/$currency"
|
||||
fi
|
||||
|
||||
httpGet $link
|
||||
|
|
Loading…
Reference in New Issue