From 33ff8d82bea9cdda1169a8279851547eb02dacec Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Sun, 18 Oct 2020 13:41:54 +0200 Subject: [PATCH] examples: fix running outside of examples dir --- examples/deploy-container.sh | 2 +- examples/deploy-nixops.sh | 2 +- examples/deploy-qemu-vm.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/deploy-container.sh b/examples/deploy-container.sh index 535e246..1cc1030 100755 --- a/examples/deploy-container.sh +++ b/examples/deploy-container.sh @@ -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 diff --git a/examples/deploy-nixops.sh b/examples/deploy-nixops.sh index 780fc00..1f54901 100755 --- a/examples/deploy-nixops.sh +++ b/examples/deploy-nixops.sh @@ -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 diff --git a/examples/deploy-qemu-vm.sh b/examples/deploy-qemu-vm.sh index 7545807..6a7541f 100755 --- a/examples/deploy-qemu-vm.sh +++ b/examples/deploy-qemu-vm.sh @@ -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