refactor(script): Differentiate between user-defined and internal vars (#1)
This commit is contained in:
parent
3277e7a31a
commit
c9fcdb5b29
@ -16,6 +16,7 @@ if [[ -r "${conf_file}" ]]; then
|
||||
source "${conf_file}"
|
||||
fi
|
||||
|
||||
# User-defined
|
||||
if [[ ! "${do_dry_run}" ]]; then do_dry_run='true'; fi
|
||||
if [[ ! "${important_names}" ]]; then important_names='linux'; fi
|
||||
if [[ ! "${snaps_trivial_keep}" ]]; then snaps_trivial_keep='15'; fi
|
||||
@ -31,6 +32,11 @@ if [[ ! "${snap_op_installation_suffix}" ]]; then snap_op_installation_suffix='i
|
||||
if [[ ! "${snap_op_remove_suffix}" ]]; then snap_op_remove_suffix='rmvl'; fi
|
||||
if [[ ! "${snap_op_upgrade_suffix}" ]]; then snap_op_upgrade_suffix='upgr'; fi
|
||||
|
||||
# Internal
|
||||
declare pkg_separator max_zfs_snapshot_name_length
|
||||
pkg_separator=':'
|
||||
max_zfs_snapshot_name_length='255'
|
||||
|
||||
function pprint () {
|
||||
local style msg exit_code
|
||||
style="${1:?}"
|
||||
@ -260,9 +266,8 @@ function main () {
|
||||
local unabridged_pkg_list_oneline
|
||||
write_pkg_list_oneline
|
||||
|
||||
local date_string max_zfs_snapshot_name_length max_dataset_name_length
|
||||
local date_string max_dataset_name_length
|
||||
date_string="$(date +"${snap_date_format}")"
|
||||
max_zfs_snapshot_name_length='255'
|
||||
find_max_dataset_name_length
|
||||
|
||||
local trimmed_pkg_list_oneline
|
||||
|
Loading…
x
Reference in New Issue
Block a user