mirror of
https://github.com/89luca89/distrobox.git
synced 2026-08-19 01:14:49 -05:00
all: add DBX_VERBOSE env variable. Fix #1151
Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
This commit is contained in:
+8
-3
@@ -134,9 +134,6 @@ if [ "${container_user_uid}" -ne 0 ]; then
|
||||
# as root (UID 0).
|
||||
distrobox_sudo_program=${DBX_SUDO_PROGRAM:-${distrobox_sudo_program:-"sudo"}}
|
||||
fi
|
||||
# Fixup non_interactive=[true|false], in case we find it in the config file(s)
|
||||
[ "${non_interactive}" = "true" ] && non_interactive=1
|
||||
[ "${non_interactive}" = "false" ] && non_interactive=0
|
||||
|
||||
[ -n "${DBX_CONTAINER_ALWAYS_PULL}" ] && container_always_pull="${DBX_CONTAINER_ALWAYS_PULL}"
|
||||
[ -n "${DBX_CONTAINER_CUSTOM_HOME}" ] && container_user_custom_home="${DBX_CONTAINER_CUSTOM_HOME}"
|
||||
@@ -147,6 +144,14 @@ fi
|
||||
[ -n "${DBX_CONTAINER_HOSTNAME}" ] && container_hostname="${DBX_CONTAINER_HOSTNAME}"
|
||||
[ -n "${DBX_NON_INTERACTIVE}" ] && non_interactive="${DBX_NON_INTERACTIVE}"
|
||||
[ -n "${DBX_CONTAINER_GENERATE_ENTRY}" ] && container_generate_entry="${DBX_CONTAINER_GENERATE_ENTRY}"
|
||||
[ -n "${DBX_VERBOSE}" ] && verbose="${DBX_VERBOSE}"
|
||||
|
||||
# Fixup variable=[true|false], in case we find it in the config file(s)
|
||||
[ "${non_interactive}" = "true" ] && non_interactive=1
|
||||
[ "${non_interactive}" = "false" ] && non_interactive=0
|
||||
# Fixup variable=[true|false], in case we find it in the config file(s)
|
||||
[ "${verbose}" = "true" ] && verbose=1
|
||||
[ "${verbose}" = "false" ] && verbose=0
|
||||
|
||||
# Print usage to stdout.
|
||||
# Arguments:
|
||||
|
||||
+7
-3
@@ -115,14 +115,18 @@ if [ "$(id -ru)" -ne 0 ]; then
|
||||
# as root (UID 0).
|
||||
distrobox_sudo_program=${DBX_SUDO_PROGRAM:-${distrobox_sudo_program:-"sudo"}}
|
||||
fi
|
||||
# Fixup non_interactive=[true|false], in case we find it in the config file(s)
|
||||
[ "${non_interactive}" = "true" ] && non_interactive=1
|
||||
[ "${non_interactive}" = "false" ] && non_interactive=0
|
||||
|
||||
[ -n "${DBX_CONTAINER_MANAGER}" ] && container_manager="${DBX_CONTAINER_MANAGER}"
|
||||
[ -n "${DBX_CONTAINER_NAME}" ] && container_name="${DBX_CONTAINER_NAME}"
|
||||
[ -n "${DBX_SKIP_WORKDIR}" ] && skip_workdir="${DBX_SKIP_WORKDIR}"
|
||||
[ -n "${DBX_NON_INTERACTIVE}" ] && non_interactive="${DBX_NON_INTERACTIVE}"
|
||||
[ -n "${DBX_VERBOSE}" ] && verbose="${DBX_VERBOSE}"
|
||||
|
||||
# Fixup variable=[true|false], in case we find it in the config file(s)
|
||||
[ "${non_interactive}" = "true" ] && non_interactive=1
|
||||
[ "${non_interactive}" = "false" ] && non_interactive=0
|
||||
[ "${verbose}" = "true" ] && verbose=1
|
||||
[ "${verbose}" = "false" ] && verbose=0
|
||||
|
||||
# Print usage to stdout.
|
||||
# Arguments:
|
||||
|
||||
@@ -71,6 +71,12 @@ for config_file in ${config_files}; do
|
||||
[ -e "${config_file}" ] && . "$(realpath "${config_file}")"
|
||||
done
|
||||
|
||||
[ -n "${DBX_VERBOSE}" ] && verbose="${DBX_VERBOSE}"
|
||||
|
||||
# Fixup variable=[true|false], in case we find it in the config file(s)
|
||||
[ "${verbose}" = "true" ] && verbose=1
|
||||
[ "${verbose}" = "false" ] && verbose=0
|
||||
|
||||
# Print usage to stdout.
|
||||
# Arguments:
|
||||
# None
|
||||
|
||||
@@ -69,6 +69,13 @@ for config_file in ${config_files}; do
|
||||
# shellcheck disable=SC1090
|
||||
[ -e "${config_file}" ] && . "$(realpath "${config_file}")"
|
||||
done
|
||||
|
||||
[ -n "${DBX_VERBOSE}" ] && verbose="${DBX_VERBOSE}"
|
||||
|
||||
# Fixup variable=[true|false], in case we find it in the config file(s)
|
||||
[ "${verbose}" = "true" ] && verbose=1
|
||||
[ "${verbose}" = "false" ] && verbose=0
|
||||
|
||||
# If we're running this script as root -- as in logged in in the shell as root
|
||||
# user, and not via SUDO/DOAS --, we don't need to set distrobox_sudo_program
|
||||
# as it's meaningless for this use case.
|
||||
|
||||
@@ -79,6 +79,13 @@ for config_file in ${config_files}; do
|
||||
# shellcheck disable=SC1090
|
||||
[ -e "${config_file}" ] && . "$(realpath "${config_file}")"
|
||||
done
|
||||
|
||||
[ -n "${DBX_VERBOSE}" ] && verbose="${DBX_VERBOSE}"
|
||||
|
||||
# Fixup variable=[true|false], in case we find it in the config file(s)
|
||||
[ "${verbose}" = "true" ] && verbose=1
|
||||
[ "${verbose}" = "false" ] && verbose=0
|
||||
|
||||
# If we're running this script as root - as in logged in in the shell as root
|
||||
# user, and not via SUDO/DOAS -, we don't need to set distrobox_sudo_program
|
||||
# as it's meaningless for this use case.
|
||||
|
||||
@@ -77,6 +77,13 @@ for config_file in ${config_files}; do
|
||||
# shellcheck disable=SC1090
|
||||
[ -e "${config_file}" ] && . "$(realpath "${config_file}")"
|
||||
done
|
||||
|
||||
[ -n "${DBX_VERBOSE}" ] && verbose="${DBX_VERBOSE}"
|
||||
|
||||
# Fixup variable=[true|false], in case we find it in the config file(s)
|
||||
[ "${verbose}" = "true" ] && verbose=1
|
||||
[ "${verbose}" = "false" ] && verbose=0
|
||||
|
||||
# If we're running this script as root - as in logged in in the shell as root
|
||||
# user, and not via SUDO/DOAS -, we don't need to set distrobox_sudo_program
|
||||
# as it's meaningless for this use case.
|
||||
|
||||
@@ -64,6 +64,13 @@ for config_file in ${config_files}; do
|
||||
# shellcheck disable=SC1090
|
||||
[ -e "${config_file}" ] && . "$(realpath "${config_file}")"
|
||||
done
|
||||
|
||||
[ -n "${DBX_VERBOSE}" ] && verbose="${DBX_VERBOSE}"
|
||||
|
||||
# Fixup variable=[true|false], in case we find it in the config file(s)
|
||||
[ "${verbose}" = "true" ] && verbose=1
|
||||
[ "${verbose}" = "false" ] && verbose=0
|
||||
|
||||
# If we're running this script as root - as in logged in in the shell as root
|
||||
# user, and not via SUDO/DOAS -, we don't need to set distrobox_sudo_program
|
||||
# as it's meaningless for this use case.
|
||||
|
||||
Reference in New Issue
Block a user