From d9420ee460394866a625cd1367b656d5c3fe9d81 Mon Sep 17 00:00:00 2001 From: slange-dev Date: Fri, 10 Jan 2025 01:34:51 +0100 Subject: [PATCH] Change location of `verify_tpm_path_permissions` function --- CHANGELOG.md | 2 ++ scripts/helpers/utility.sh | 8 ++++++++ scripts/install_plugins.sh | 8 -------- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9ce81e..14ad05a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog ### master +- change location of `verify_tpm_path_permissions` function from `scripts/install_plugins.sh` to `scripts/helper/utility.sh`. + Reason: it is a helper funcction, not a install function. ### v3.1.0, 2023-01-03 - upgrade to new version of `tmux-test` diff --git a/scripts/helpers/utility.sh b/scripts/helpers/utility.sh index de6eb35..bc19384 100644 --- a/scripts/helpers/utility.sh +++ b/scripts/helpers/utility.sh @@ -2,6 +2,14 @@ ensure_tpm_path_exists() { mkdir -p "$(tpm_path)" } +verify_tpm_path_permissions() { + local path="$(tpm_path)" + # check the write permission flag for all users to ensure + # that we have proper access + [ -w "$path" ] || + echo_err "$path is not writable!" +} + fail_helper() { local message="$1" echo "$message" >&2 diff --git a/scripts/install_plugins.sh b/scripts/install_plugins.sh index e2450ac..861de7e 100755 --- a/scripts/install_plugins.sh +++ b/scripts/install_plugins.sh @@ -58,14 +58,6 @@ install_plugins() { done } -verify_tpm_path_permissions() { - local path="$(tpm_path)" - # check the write permission flag for all users to ensure - # that we have proper access - [ -w "$path" ] || - echo_err "$path is not writable!" -} - main() { ensure_tpm_path_exists verify_tpm_path_permissions