Change location of verify_tpm_path_permissions
function
This commit is contained in:
parent
99469c4a9b
commit
d9420ee460
3 changed files with 10 additions and 8 deletions
|
@ -1,6 +1,8 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
### master
|
### 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
|
### v3.1.0, 2023-01-03
|
||||||
- upgrade to new version of `tmux-test`
|
- upgrade to new version of `tmux-test`
|
||||||
|
|
|
@ -2,6 +2,14 @@ ensure_tpm_path_exists() {
|
||||||
mkdir -p "$(tpm_path)"
|
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() {
|
fail_helper() {
|
||||||
local message="$1"
|
local message="$1"
|
||||||
echo "$message" >&2
|
echo "$message" >&2
|
||||||
|
|
|
@ -58,14 +58,6 @@ install_plugins() {
|
||||||
done
|
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() {
|
main() {
|
||||||
ensure_tpm_path_exists
|
ensure_tpm_path_exists
|
||||||
verify_tpm_path_permissions
|
verify_tpm_path_permissions
|
||||||
|
|
Loading…
Reference in a new issue