dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit cb089a0fa649a01a9108d13af900f6b2c49aa36e
parent 6e2025c516b069090c143675346b6e3f18af21cc
Author: Anders Damsgaard <andersd@riseup.net>
Date:   Tue,  9 May 2017 12:00:01 -0400

use torify if available

Diffstat:
Mbin/currency | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/bin/currency b/bin/currency @@ -22,7 +22,12 @@ if [ $TO == $FROM ]; then echo "Nothing to do!"; exit 2; fi CONVERTER="http://www.google.com/finance/converter?a=$A&from=$FROM&to=$TO" #echo $CONVERTER -RESULT=`wget -nv -O - "$CONVERTER" 2>&1 | \ +GETCMD="wget --no-verbose" +if command -v torify >/dev/null 2>/dev/null; then + GETCMD="torify $GETCMD" +fi + +RESULT=`$GETCMD -O - "$CONVERTER" 2>&1 | \ LC_ALL=C sed -n -e 's/.*<span class=bld>\(.*\)<\/span>.*/\1/p'` #echo "Result: $A $FROM = $RESULT"