diff --git a/ac-cli.sh b/ac-cli.sh index bf80274..7c48da7 100755 --- a/ac-cli.sh +++ b/ac-cli.sh @@ -1,5 +1,5 @@ #!/bin/bash -set -eo pipefail +cd "${BASH_SOURCE%/*}" || exit cli="komodo-cli" args="$@" diff --git a/checkwalletsize.sh b/checkwalletsize.sh index 50d2d87..ffc9e88 100755 --- a/checkwalletsize.sh +++ b/checkwalletsize.sh @@ -1,3 +1,4 @@ #!/bin/bash +cd "${BASH_SOURCE%/*}" || exit ls -lahS ~/.*/wallet.dat ~/.komodo/*/wallet.dat diff --git a/countutxos.sh b/countutxos.sh index 10b8669..239cd14 100755 --- a/countutxos.sh +++ b/countutxos.sh @@ -1,4 +1,5 @@ #!/bin/bash +cd "${BASH_SOURCE%/*}" || exit # Optionally just get the cli for a single coin # e.g "KMD" diff --git a/getrawtx.sh b/getrawtx.sh index 58b07a2..e22fb38 100755 --- a/getrawtx.sh +++ b/getrawtx.sh @@ -1,4 +1,5 @@ #!/bin/bash +cd "${BASH_SOURCE%/*}" || exit coin=$1 txid=$2 diff --git a/listclis.sh b/listclis.sh index fcc6c97..66c379f 100755 --- a/listclis.sh +++ b/listclis.sh @@ -1,4 +1,5 @@ #!/bin/bash +cd "${BASH_SOURCE%/*}" || exit # Optionally just get the cli for a single coin # e.g "KMD" diff --git a/listcoins.sh b/listcoins.sh index d656662..520b777 100755 --- a/listcoins.sh +++ b/listcoins.sh @@ -1,4 +1,5 @@ #!/bin/bash +cd "${BASH_SOURCE%/*}" || exit echo "BTC" echo "CHIPS" diff --git a/splitfunds.sh b/splitfunds.sh index 4a37e76..d4857ba 100755 --- a/splitfunds.sh +++ b/splitfunds.sh @@ -1,4 +1,5 @@ #!/bin/bash +cd "${BASH_SOURCE%/*}" || exit coin=$1 duplicates=$2 diff --git a/startassetchains.sh b/startassetchains.sh index 1234f23..e0695d7 100755 --- a/startassetchains.sh +++ b/startassetchains.sh @@ -1,5 +1,5 @@ #!/bin/bash -set -eo pipefail +cd "${BASH_SOURCE%/*}" || exit cli="komodo-cli" overide_args="$@" diff --git a/upgrade.sh b/upgrade.sh index a1510cb..0fa83b1 100755 --- a/upgrade.sh +++ b/upgrade.sh @@ -1,4 +1,5 @@ #!/bin/bash +cd "${BASH_SOURCE%/*}" || exit echo "Requesting root..." sudo true diff --git a/walletreset.sh b/walletreset.sh index 8fd02f9..807c21b 100755 --- a/walletreset.sh +++ b/walletreset.sh @@ -1,4 +1,5 @@ #!/bin/bash +cd "${BASH_SOURCE%/*}" || exit # Coin we're resetting # e.g "KMD" diff --git a/walletresetac.sh b/walletresetac.sh index caaa503..04423ee 100755 --- a/walletresetac.sh +++ b/walletresetac.sh @@ -1,4 +1,5 @@ #!/bin/bash +cd "${BASH_SOURCE%/*}" || exit pubkey=$(cat pubkey.txt) diff --git a/walletresetchips.sh b/walletresetchips.sh index 900dd34..4cc1ad8 100755 --- a/walletresetchips.sh +++ b/walletresetchips.sh @@ -1,6 +1,7 @@ #!/bin/bash +cd "${BASH_SOURCE%/*}" || exit -source ~/komodo/src/pubkey.txt +pubkey=$(cat pubkey.txt) coin="CHIPS" daemon="chipsd -pubkey=${pubkey}" diff --git a/walletresetgame.sh b/walletresetgame.sh index 35bbe2f..ca2e4a1 100755 --- a/walletresetgame.sh +++ b/walletresetgame.sh @@ -1,4 +1,5 @@ #!/bin/bash +cd "${BASH_SOURCE%/*}" || exit pubkey=$(cat pubkey.txt) diff --git a/walletresetkmd.sh b/walletresetkmd.sh index 59c368f..e566c5d 100755 --- a/walletresetkmd.sh +++ b/walletresetkmd.sh @@ -1,4 +1,5 @@ #!/bin/bash +cd "${BASH_SOURCE%/*}" || exit pubkey=$(cat pubkey.txt) diff --git a/walletresetvrsc.sh b/walletresetvrsc.sh index f6fd687..4a10711 100755 --- a/walletresetvrsc.sh +++ b/walletresetvrsc.sh @@ -1,4 +1,5 @@ #!/bin/bash +cd "${BASH_SOURCE%/*}" || exit pubkey=$(cat pubkey.txt)