1
0
mirror of https://github.com/romanz/electrs.git synced 2024-11-19 01:43:29 +01:00
electrs/contrib/venv_wrapper.sh
jroulin 3d7c35b0a4
contrib: rename xpub into get_balance (#627)
* rename xpub into get_balance

- support a single address or an xpub address
- detail the balance per address when using an xpub

* Replace 'virtualenv' by 'python -m venv'

---------

Co-authored-by: Roman Zeyde <me@romanzey.de>
2023-03-12 22:44:00 +02:00

19 lines
340 B
Bash
Executable File

#!/bin/bash
set -e
cd -- "$( dirname -- "${BASH_SOURCE[0]}" )"
cmd="$(basename -- "${BASH_SOURCE[0]}" .sh)".py
if [ "$1" = "--venv" ]; then
shift
if [ ! -d .venv ]; then
python -m venv .venv
.venv/bin/pip install pycoin logbook prettytable base58
fi
PATH=$PWD/.venv/bin:$PATH
fi
exec python "$cmd" "$@"