mirror of
https://github.com/Llewellynvdm/CoinRate.git
synced 2024-11-22 02:55:08 +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
|
# set send key
|
||||||
setSendKey
|
setSendKey
|
||||||
# set target values and perform action if only TargetValue given
|
# set target values and perform action if only TargetValue given
|
||||||
if (( "$TargetBelowValue" == 0 && "$TargetAboveValue" == 0));
|
if (( "$TargetBelow" == 0 && "$TargetAbove" == 0));
|
||||||
then
|
then
|
||||||
getTarget "$TargetValue" "$value" 'setAction'
|
getTarget "$TargetValue" "$value" 'setAction'
|
||||||
fi
|
fi
|
||||||
# set target values and perform action if TargetBelowValue given
|
# set target values and perform action if TargetBelowValue given
|
||||||
if (( "$TargetAboveValue" != 0 ));
|
if (( "$TargetAbove" == 1 ));
|
||||||
then
|
then
|
||||||
getTarget "$TargetAboveValue" "$value" 'setActionAbove'
|
getTarget "$TargetAboveValue" "$value" 'setActionAbove'
|
||||||
fi
|
fi
|
||||||
# set target values and perform action if TargetBelowValue given
|
# set target values and perform action if TargetBelowValue given
|
||||||
if (( "$TargetBelowValue" != 0 ));
|
if (( "$TargetBelow" == 1 ));
|
||||||
then
|
then
|
||||||
getTarget "$TargetBelowValue" "$value" 'setActionBelow'
|
getTarget "$TargetBelowValue" "$value" 'setActionBelow'
|
||||||
fi
|
fi
|
||||||
@ -314,6 +314,8 @@ Target="USD"
|
|||||||
TargetValue="17000"
|
TargetValue="17000"
|
||||||
TargetBelowValue=0
|
TargetBelowValue=0
|
||||||
TargetAboveValue=0
|
TargetAboveValue=0
|
||||||
|
TargetBelow=0
|
||||||
|
TargetAbove=0
|
||||||
sendKey=$(TZ=":ZULU" date +"%m/%d/%Y" )
|
sendKey=$(TZ=":ZULU" date +"%m/%d/%Y" )
|
||||||
allowEcho=1
|
allowEcho=1
|
||||||
send=0
|
send=0
|
||||||
@ -388,9 +390,11 @@ while getopts ":c:C:h:v:A:B:b :a :t :s :q :l :" opt; do
|
|||||||
;;
|
;;
|
||||||
B)
|
B)
|
||||||
TargetBelowValue=$OPTARG
|
TargetBelowValue=$OPTARG
|
||||||
|
TargetBelow=1
|
||||||
;;
|
;;
|
||||||
A)
|
A)
|
||||||
TargetAboveValue=$OPTARG
|
TargetAboveValue=$OPTARG
|
||||||
|
TargetAbove=1
|
||||||
;;
|
;;
|
||||||
b)
|
b)
|
||||||
BelowValue=1
|
BelowValue=1
|
||||||
|
Loading…
Reference in New Issue
Block a user