Browse Source

Support precious metals

Samuel W. Flint 6 years ago
parent
commit
11776bc4d6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      bean-prices

+ 1 - 1
bean-prices

@@ -17,7 +17,7 @@ for line in $(cat ~/.ledger/commodities.txt ) ; do
     elif [ $TYPE == 's' ] ; then
         bean-price -e "USD:google/$COMMODITY" | awk -e '{printf "%s %s %s %.2f %s\n", $1, $2, $3, $4, $5}'  | tee -a ${TEMP_FILE}
     elif [ $TYPE == 'm' ] ; then
-        echo "Precious metals are not currently supported."
+        bean-price -e "USD:oanda/${COMMODITY}_USD" | sed -e 's/_USD//' | awk -e '{printf "%s %s %s %.2f %s\n", $1, $2, $3, $4, $5}'  | tee -a ${TEMP_FILE}
     else
         echo "$TYPE is not currently a known type."
     fi