diff --git a/bin/create.contract b/bin/create.contract index e75d2f39fcac667a90eae58c8c836b2a0ad408b2..f7a36c0ff88ab9452775a3aa6278b2b18678fe59 100755 --- a/bin/create.contract +++ b/bin/create.contract @@ -35,7 +35,7 @@ EOT echo '*** Creating contract. This will take at least 16 seconds.' outfile=$( mktemp ) cleanup "$outfile" - geth_exec_js $js > $outfile + geth_exec_file $js > $outfile if [ ` wc -l < $outfile ` = 2 -a `tail -1 < $outfile` = "true" ] then addr=` head -1 < $outfile ` diff --git a/bin/insert.sh b/bin/insert.sh index c52dda09f3e1355f2adacf35c9cd42396352f183..dba01efb59e61bddcee6c481e719f35476991ee5 100755 --- a/bin/insert.sh +++ b/bin/insert.sh @@ -37,7 +37,7 @@ console.log ( thecontract.put.sendTransaction( "${sum}", {from: eth.accounts[0], EOT out=$( mktemp ) cleanup "$out" -geth_exec_js "${js}" > ${out} +geth_exec_file "${js}" > ${out} if [ ` wc -l < ${out} ` = 2 -a ` tail -1 < ${out} ` = "true" ] then trans=` head -1 < ${out} ` diff --git a/bin/libbfa.sh b/bin/libbfa.sh index 7c125c30be267407a021c38a2fe3800da273822c..d4147ca7885f483af91ad56a9db1d58646c997e1 100644 --- a/bin/libbfa.sh +++ b/bin/libbfa.sh @@ -43,7 +43,7 @@ function geth_attach $cat | geth --cache 0 "$@" attach ipc:${BFANODEDIR}/geth.ipc } -function geth_exec_js +function geth_exec_file { test -r "$1" if echo $- | grep -q x && [ -t 1 ] diff --git a/bin/maymine.sh b/bin/maymine.sh index 426d6cbd5c4d26f7421616422c387f863d06b901..fae115555b516534eeebd3aa356ca26a9fe66604 100755 --- a/bin/maymine.sh +++ b/bin/maymine.sh @@ -5,7 +5,7 @@ if [ -z "${BFAHOME}" ]; then echo "\$BFAHOME not set. Did you source bfa/bin/env source ${BFAHOME}/bin/libbfa.sh || exit 1 bfaconfig node -res=$( geth_exec_js "${BFAHOME}/src/js.maymine" ) +res=$( geth_exec_file "${BFAHOME}/src/js.maymine" ) if [ "$res" = "true" ] then diff --git a/bin/rewind.sh b/bin/rewind.sh index ff4c62b060b2014baadd4d25afe88cfdf967bcc2..c4d6529244e499cccb6f3f5735f941244e8ee2ea 100755 --- a/bin/rewind.sh +++ b/bin/rewind.sh @@ -3,4 +3,4 @@ if [ -z "${BFAHOME}" ]; then echo "\$BFAHOME not set. Did you source bfa/bin/env ?" >&2; exit 1; fi source ${BFAHOME}/bin/libbfa.sh || exit 1 -geth_exec_js ${BFAHOME}/src/js.rewind +geth_exec_file ${BFAHOME}/src/js.rewind diff --git a/bin/tsa-insert.sh b/bin/tsa-insert.sh index cd29cb768650e3a7f6fa6a8e866dc8a70a0b249f..1509e6d23d20aa04fae6bb23b086e9b15f6be112 100755 --- a/bin/tsa-insert.sh +++ b/bin/tsa-insert.sh @@ -29,7 +29,7 @@ console.log( thecontract.put.sendTransaction( [${hashes}], {from: eth.accounts[0 EOT out=$( mktemp ) cleanup "$out" -geth_exec_js "${js}" > ${out} +geth_exec_file "${js}" > ${out} if [ ` wc -l < ${out} ` = 2 -a ` tail -1 < ${out} ` = "true" ] then trans=` head -1 < ${out} ` diff --git a/bin/tsa-verify.sh b/bin/tsa-verify.sh index 390ebcc2c7c451b98a4606b214c29c2684568feb..c2a055d51e67b879f3d9b5ab781d70683ba0304d 100755 --- a/bin/tsa-verify.sh +++ b/bin/tsa-verify.sh @@ -25,7 +25,7 @@ console.log( thecontract.get.call( [${hashes}], {from: eth.accounts[0], gas: 100 EOT out=$( mktemp ) cleanup "$out" -geth_exec_js "${js}" > ${out} +geth_exec_file "${js}" > ${out} if [ ` wc -l < ${out} ` = 2 -a ` tail -1 < ${out} ` = "true" ] then block=` head -1 < $out `