mirror of
https://github.com/Llewellynvdm/CoinRate.git
synced 2024-11-24 19:37:32 +00:00
Fixed the TargetAbove/Below switch
This commit is contained in:
parent
a30a3395a0
commit
38f608959a
10
getPrice.sh
10
getPrice.sh
@ -43,17 +43,17 @@ function main () {
|
||||
# set send key
|
||||
setSendKey
|
||||
# set target values and perform action if only TargetValue given
|
||||
if (( "$TargetBelowValue" == 0 && "$TargetAboveValue" == 0));
|
||||
if (( "$TargetBelow" == 0 && "$TargetAbove" == 0));
|
||||
then
|
||||
getTarget "$TargetValue" "$value" 'setAction'
|
||||
fi
|
||||
# set target values and perform action if TargetBelowValue given
|
||||
if (( "$TargetAboveValue" != 0 ));
|
||||
if (( "$TargetAbove" == 1 ));
|
||||
then
|
||||
getTarget "$TargetAboveValue" "$value" 'setActionAbove'
|
||||
fi
|
||||
# set target values and perform action if TargetBelowValue given
|
||||
if (( "$TargetBelowValue" != 0 ));
|
||||
if (( "$TargetBelow" == 1 ));
|
||||
then
|
||||
getTarget "$TargetBelowValue" "$value" 'setActionBelow'
|
||||
fi
|
||||
@ -314,6 +314,8 @@ Target="USD"
|
||||
TargetValue="17000"
|
||||
TargetBelowValue=0
|
||||
TargetAboveValue=0
|
||||
TargetBelow=0
|
||||
TargetAbove=0
|
||||
sendKey=$(TZ=":ZULU" date +"%m/%d/%Y" )
|
||||
allowEcho=1
|
||||
send=0
|
||||
@ -388,9 +390,11 @@ while getopts ":c:C:h:v:A:B:b :a :t :s :q :l :" opt; do
|
||||
;;
|
||||
B)
|
||||
TargetBelowValue=$OPTARG
|
||||
TargetBelow=1
|
||||
;;
|
||||
A)
|
||||
TargetAboveValue=$OPTARG
|
||||
TargetAbove=1
|
||||
;;
|
||||
b)
|
||||
BelowValue=1
|
||||
|
Loading…
Reference in New Issue
Block a user