support --quiet and split up data access from presentation

This commit is contained in:
Michael Hobbs
2016-07-17 15:56:11 -07:00
parent 514ebf4d84
commit a269f8e003
2 changed files with 7 additions and 7 deletions

View File

@@ -166,14 +166,14 @@ ps_scale() {
fi
}
get_restart_policies() {
declare desc="strips docker options and prints restart policies"
local -r phase_file_path=$1
[[ -r "$phase_file_path" ]] && sed -e '/^--restart=/!d' -e 's/^--restart=/ /' < "$phase_file_path"
}
get_raw_restart_policies() {
declare desc="strips docker options and prints raw restart policies"
local -r phase_file_path=$1
[[ -r "$phase_file_path" ]] && sed -e '/^--restart=/!d' < "$phase_file_path"
}
get_restart_policies() {
declare desc="strips docker options and prints restart policies"
local -r phase_file_path=$1
get_raw_restart_policies "$phase_file_path" | sed -e 's/^--restart=//g'
}