From 12e88f797f7c94817bab2917e0c04a5364f5c7d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Macedo?= Date: Wed, 10 Jul 2024 17:41:53 -0300 Subject: [PATCH] Avoid legacy scripts to run outside its original folder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: André Macedo --- scripts/legacy/generateTar.sh | 4 ++++ scripts/legacy/generateTemplateTar2.sh | 4 ++++ 2 files changed, 8 insertions(+) mode change 100644 => 100755 scripts/legacy/generateTar.sh diff --git a/scripts/legacy/generateTar.sh b/scripts/legacy/generateTar.sh old mode 100644 new mode 100755 index c62c51e..d9217b1 --- a/scripts/legacy/generateTar.sh +++ b/scripts/legacy/generateTar.sh @@ -1,5 +1,9 @@ #!/usr/bin/bash +cd "$(dirname "$0")" +CUR_DIR=$(pwd) +cd ../.. + # Default values for the flags FLAG_CCAPI="none" FLAG_LABEL="1.0" diff --git a/scripts/legacy/generateTemplateTar2.sh b/scripts/legacy/generateTemplateTar2.sh index 53faf37..3c97b95 100755 --- a/scripts/legacy/generateTemplateTar2.sh +++ b/scripts/legacy/generateTemplateTar2.sh @@ -1,5 +1,9 @@ #!/usr/bin/env bash +cd "$(dirname "$0")" +CUR_DIR=$(pwd) +cd ../.. + # Make sure go mod is up to date cd chaincode && GOWORK=off go mod vendor && cd ..