examples: fix running outside of examples dir

This commit is contained in:
Erik Arvstedt 2020-10-18 13:41:54 +02:00
parent 06cba7b519
commit 33ff8d82be
No known key found for this signature in database
GPG Key ID: 33312B944DD97846
3 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@ fi
if [[ ! -v IN_NIX_SHELL ]]; then
echo "Running script in nix shell env..."
cd "${BASH_SOURCE[0]%/*}"
exec nix-shell --run "${BASH_SOURCE[0]}"
exec nix-shell --run "./${BASH_SOURCE[0]##*/}"
fi
# Uncomment to start a container shell session

View File

@ -11,7 +11,7 @@ set -euo pipefail
if [[ ! -v IN_NIX_SHELL ]]; then
echo "Running script in nix shell env..."
cd "${BASH_SOURCE[0]%/*}"
exec nix-shell --run "${BASH_SOURCE[0]}"
exec nix-shell --run "./${BASH_SOURCE[0]##*/}"
fi
# Cleanup on exit

View File

@ -14,7 +14,7 @@ set -euo pipefail
if [[ ! -v IN_NIX_SHELL ]]; then
echo "Running script in nix shell env..."
cd "${BASH_SOURCE[0]%/*}"
exec nix-shell --run "${BASH_SOURCE[0]}"
exec nix-shell --run "./${BASH_SOURCE[0]##*/}"
fi
tmpDir=/tmp/nix-bitcoin-qemu-vm