Dario Faggioli
60d52da4fe
- Update to latest version (1.4.0) - Patches removed: 0001-enter-fix-automatic-container-creation-when-r-is-use.patch 0002-distrobox-handle-situations-with-weird-manpages-setu.patch 0002-opensuse-check-for-the-config-file-in-usr-etc-too.patch 0003-distrobox-if-no-command-is-specified-default-to-ente.patch 0004-opensuse-check-for-the-config-file-in-usr-etc-too.patch - Patches added: 0001-distrobox-if-no-command-is-specified-default-to-ente.patch - Changes in 1.4.0: * New distrobox upgrade command, to update all the containers at once * New distrobox generate-entry command, to add your distrobox to the app list note that from 1.4.0 onwards this will be the default behaviour for all the new containers created * New distrobox ephemeral command, to quickly spawn, use and delete a container. All-in-one. * New install-podman script to install Podman in $HOME. Handy for @ValveSoftware SteamDeck users * Distrobox-host-exec now uses exclusively the host-spawn command from @1player * Better support for AD/LDap and Kerberos usernames * Better support for Nix/Guix hosts * Plenty of bug fixes and CI/Test improvements smile OBS-URL: https://build.opensuse.org/request/show/1003683 OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/distrobox?expand=0&rev=17
69 lines
1.7 KiB
Diff
69 lines
1.7 KiB
Diff
From a4f0fd0560c39d58472ef09e4228948e88012d33 Mon Sep 17 00:00:00 2001
|
|
From: Dario Faggioli <dfaggioli@suse.com>
|
|
Date: Thu, 28 Jul 2022 10:10:28 +0200
|
|
Subject: [PATCH] distrobox: if no command is specified, default to enter
|
|
|
|
If just `distrobox` is invoked, without any command, assume
|
|
`distrobox enter`.
|
|
|
|
Signed-off-by: Dario Faggioli <dfaggioli@suse.com>
|
|
---
|
|
distrobox | 18 ++++++++++++------
|
|
docs/README.md | 1 +
|
|
2 files changed, 13 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/distrobox b/distrobox
|
|
index 0f83b54..9b53547 100755
|
|
--- a/distrobox
|
|
+++ b/distrobox
|
|
@@ -19,6 +19,12 @@
|
|
# along with distrobox; if not, see <http://www.gnu.org/licenses/>.
|
|
|
|
# POSIX
|
|
+# Optional env variables:
|
|
+# DBX_DEFAULT_COMMAND
|
|
+
|
|
+default_command="enter"
|
|
+[ -n "${DBX_DEFAULT_COMMAND}" ] && default_command="${DBX_DEFAULT_COMMAND}"
|
|
+
|
|
set -o errexit
|
|
set -o nounset
|
|
|
|
@@ -48,15 +54,15 @@ Choose one of the available commands:
|
|
EOF
|
|
}
|
|
|
|
+distrobox_path="$(dirname "${0}")"
|
|
if [ $# -eq 0 ]; then
|
|
- show_help
|
|
- exit
|
|
+ printf "No command specified. Assuming: distrobox-%s\n" "${default_command}"
|
|
+ distrobox_command="${default_command}"
|
|
+else
|
|
+ distrobox_command="${1}"
|
|
+ shift
|
|
fi
|
|
|
|
-distrobox_path="$(dirname "${0}")"
|
|
-distrobox_command="${1}"
|
|
-shift
|
|
-
|
|
# Simple wrapper to the distrobox utilities.
|
|
# We just detect the 1st argument and launch the matching distrobox utility.
|
|
case "${distrobox_command}" in
|
|
diff --git a/docs/README.md b/docs/README.md
|
|
index 8ec20bf..165985f 100644
|
|
--- a/docs/README.md
|
|
+++ b/docs/README.md
|
|
@@ -283,6 +283,7 @@ Alternatively it is possible to specify preferences using ENV variables:
|
|
- DBX_CONTAINER_NAME
|
|
- DBX_NON_INTERACTIVE
|
|
- DBX_SKIP_WORKDIR
|
|
+- DBX_DEFAULT_COMMAND
|
|
|
|
---
|
|
|
|
--
|
|
2.37.3
|
|
|