From 2980b2d5960160db5c6744177164735cf758dbbc Mon Sep 17 00:00:00 2001 From: pforret Date: Thu, 9 Nov 2023 10:59:06 +0100 Subject: [PATCH] MOD: shmixcloud.sh --- shmixcloud.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/shmixcloud.sh b/shmixcloud.sh index 17ab6a2..cc3f15a 100755 --- a/shmixcloud.sh +++ b/shmixcloud.sh @@ -767,8 +767,11 @@ recursive_readlink() { } lookup_script_data() { + # shellcheck disable=SC2155 readonly script_prefix=$(basename "${BASH_SOURCE[0]}" .sh) + # shellcheck disable=SC2155 readonly script_basename=$(basename "${BASH_SOURCE[0]}") + # shellcheck disable=SC2155 readonly execution_day=$(date "+%Y-%m-%d") #readonly execution_year=$(date "+%Y") @@ -776,6 +779,7 @@ lookup_script_data() { debug "$info_icon Script path: $script_install_path" script_install_path=$(recursive_readlink "$script_install_path") debug "$info_icon Linked path: $script_install_path" + # shellcheck disable=SC2155 readonly script_install_folder="$( cd -P "$( dirname "$script_install_path" )" && pwd )" debug "$info_icon In folder : $script_install_folder" if [[ -f "$script_install_path" ]]; then @@ -796,6 +800,7 @@ lookup_script_data() { [[ -n "${KSH_VERSION:-}" ]] && shell_brand="ksh" && shell_version="$KSH_VERSION" debug "$info_icon Shell type : $shell_brand - version $shell_version" + # shellcheck disable=SC2155 readonly os_kernel=$(uname -s) os_version=$(uname -r) os_machine=$(uname -m) @@ -847,8 +852,10 @@ lookup_script_data() { # if run inside a git repo, detect for which remote repo it is if git status &>/dev/null; then + # shellcheck disable=SC2155 readonly git_repo_remote=$(git remote -v | awk '/(fetch)/ {print $2}') debug "$info_icon git remote : $git_repo_remote" + # shellcheck disable=SC2155 readonly git_repo_root=$(git rev-parse --show-toplevel) debug "$info_icon git folder : $git_repo_root" else