diff options
-rwxr-xr-x | local/bin/grab-spot | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/local/bin/grab-spot b/local/bin/grab-spot index de49f12..d116252 100755 --- a/local/bin/grab-spot +++ b/local/bin/grab-spot @@ -9,7 +9,7 @@ if [ -z $2 ]; then fi # Only bother downloading if it's more than 3 hours old -if [ $(find ~/.cache/"$1$2" -mmin +60) ] ; then +if ([ ! -f ~/.cache/"$1$2" ] || [ $(find ~/.cache/"$1$2" -mmin +60) ]) ; then rate=$(curl "http://rate-exchange-1.appspot.com/currency?from=$1&to=$2" | jshon -e rate) if [ $? -ne 0 ] ; then logger "$0: curl error" |