From 92f96b87b30d7196c5a74c80b0c2b0b4d1b59d42 Mon Sep 17 00:00:00 2001 From: envin Date: Wed, 20 Nov 2024 16:21:59 +0100 Subject: [PATCH] feat: improve scripts log --- cpp/scripts/push-action.sh | 2 +- cpp/scripts/utils.sh | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cpp/scripts/push-action.sh b/cpp/scripts/push-action.sh index b3c2733e..87c36e41 100644 --- a/cpp/scripts/push-action.sh +++ b/cpp/scripts/push-action.sh @@ -5,7 +5,7 @@ dir_name=$(dirname "$(realpath "${BASH_SOURCE[0]}")") source "$dir_name/constants.sh" function push_action { - echo "cleos -u $NODEOSURL push action $*" + echo "$print_cleos_cmd push action $*" cleos push action "$@" } diff --git a/cpp/scripts/utils.sh b/cpp/scripts/utils.sh index aa396a94..262dcca5 100644 --- a/cpp/scripts/utils.sh +++ b/cpp/scripts/utils.sh @@ -107,4 +107,8 @@ function add_key_value_string { function add_key_value_number { add_key_value "number" "$@" -} \ No newline at end of file +} + +function print_cleos_cmd { + echo "$(grep -Po '`[a-z\s]+' <<< "$(type cleos)" | tr -d '`') push action $*" +}