diff --git a/libexec/mcd/mcd---fail b/libexec/mcd/mcd---fail index 5fb67f2..864d878 100755 --- a/libexec/mcd/mcd---fail +++ b/libexec/mcd/mcd---fail @@ -1,7 +1,6 @@ #!/usr/bin/env bash set -e err=${1##*/} -act=${err%\:*} -echo "Error:${err#*\:}" >&2; echo >&2 +echo $err >&2; echo >&2 mcd >&2 ${act#*-} --help exit 1 diff --git a/libexec/mcd/mcd-cdp-dai b/libexec/mcd/mcd-cdp-dai index fe86022..40cb360 100755 --- a/libexec/mcd/mcd-cdp-dai +++ b/libexec/mcd/mcd-cdp-dai @@ -2,7 +2,7 @@ set -e case $1 in exit) { - [ -n "$2" ] || mcd --fail "cdp: Please specify a dai amount" + [ -n "$2" ] || mcd --fail "mcd-cdp: Please specify a dai amount" wad=$(seth --to-uint256 $(seth --to-hex $(seth --to-wei "$2 eth"))) if [[ $MCD_PROXY == yes ]]; then sig="exit(address,address,uint,address,uint)" diff --git a/libexec/mcd/mcd-cdp-gem b/libexec/mcd/mcd-cdp-gem index 42b2e8a..c36e6e3 100755 --- a/libexec/mcd/mcd-cdp-gem +++ b/libexec/mcd/mcd-cdp-gem @@ -2,7 +2,7 @@ set -e case $1 in exit) { - [ -n "$2" ] || mcd --fail "cdp: Please specify a gem amount" + [ -n "$2" ] || mcd --fail "mcd-cdp: Please specify a gem amount" join=$(mcd gem adapter) wad=$(seth --to-uint256 $(seth --to-hex $(seth --to-wei "$2 eth"))) if [[ $MCD_PROXY == yes ]]; then diff --git a/libexec/mcd/mcd-dai-exit b/libexec/mcd/mcd-dai-exit index e080bd1..7e0c719 100755 --- a/libexec/mcd/mcd-dai-exit +++ b/libexec/mcd/mcd-dai-exit @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -e -[ -n "$1" ] || mcd --fail "dai: Please specify an exit amount" +[ -n "$1" ] || mcd --fail "mcd-dai: Please specify an exit amount" urn=$(mcd --require-urn dai) guy=$(mcd --to-address ${2:-$ETH_FROM}) diff --git a/libexec/mcd/mcd-dai-join b/libexec/mcd/mcd-dai-join index 75c9d92..035c7ec 100755 --- a/libexec/mcd/mcd-dai-join +++ b/libexec/mcd/mcd-dai-join @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -e -[ -n "$1" ] || mcd --fail "dai: Please specify a join amount" +[ -n "$1" ] || mcd --fail "mcd-dai: Please specify a join amount" approve() { seth send "$MCD_DAI" "approve(address)" $MCD_JOIN_DAI diff --git a/libexec/mcd/mcd-gem-exit b/libexec/mcd/mcd-gem-exit index d324ea6..b7df93f 100755 --- a/libexec/mcd/mcd-gem-exit +++ b/libexec/mcd/mcd-gem-exit @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -e -[ -n "$1" ] || mcd --fail "gem: Please specify an exit amount" +[ -n "$1" ] || mcd --fail "mcd-gem: Please specify an exit amount" urn=$(mcd --require-urn gem) guy=$(mcd --to-address ${2:-$ETH_FROM}) diff --git a/libexec/mcd/mcd-gem-join b/libexec/mcd/mcd-gem-join index 0e57238..cb71123 100755 --- a/libexec/mcd/mcd-gem-join +++ b/libexec/mcd/mcd-gem-join @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -e -[ -n "$1" ] || mcd --fail "gem: Please specify a join amount" +[ -n "$1" ] || mcd --fail "mcd-gem: Please specify a join amount" mcd---require-ilk-opt diff --git a/libexec/mcd/mcd-unwrap b/libexec/mcd/mcd-unwrap index 881f73a..6313de5 100755 --- a/libexec/mcd/mcd-unwrap +++ b/libexec/mcd/mcd-unwrap @@ -3,7 +3,7 @@ ### Usage: mcd unwrap set -e mcd --require-from $0 &>/dev/null -[ -n "$1" ] || mcd --fail "wrap: Please specify an amount to wrap" +[ -n "$1" ] || mcd --fail "mcd-wrap: Please specify an amount to wrap" seth send ${ETH?} 'withdraw(uint)' $(seth --to-word $(seth --to-wei "$1 eth")) [[ $SETH_ASYNC == yes ]] && exit 1 diff --git a/libexec/mcd/mcd-wrap b/libexec/mcd/mcd-wrap index 658247c..1c3b6a3 100755 --- a/libexec/mcd/mcd-wrap +++ b/libexec/mcd/mcd-wrap @@ -3,7 +3,7 @@ ### Usage: mcd wrap set -e mcd --require-from $0 &>/dev/null -[ -n "$1" ] || mcd --fail "wrap: Please specify an amount to wrap" +[ -n "$1" ] || mcd --fail "mcd-wrap: Please specify an amount to wrap" seth send ${ETH?} --value $(seth --to-wei "$1 eth") [[ $SETH_ASYNC == yes ]] && exit 1