From ba766105125103f86c64c658e7a6a49807723102 Mon Sep 17 00:00:00 2001 From: Roberto Aguilar Date: Wed, 3 Sep 2025 00:31:27 -0600 Subject: [PATCH] Make the Docker DBs file scriptable I'm creating dotfiles that as soon as Omarchy is installed, allow me to perform my own customizations to get the system up and running in no time according to my own needs. One of them for example runs: ~/.local/share/omarchy/bin/omarchy-install-dev-env laravel However, something like that is not possible with the Docker databases because it assumes interactivity via `gum`. This PR fixes that by either taking the choices as arguments or providing interactivity when that's not the case. ~/.local/share/omarchy/bin/omarchy-install-docker-dbs MySQL --- bin/omarchy-install-docker-dbs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/omarchy-install-docker-dbs b/bin/omarchy-install-docker-dbs index 20a779f..75f8044 100755 --- a/bin/omarchy-install-docker-dbs +++ b/bin/omarchy-install-docker-dbs @@ -1,7 +1,12 @@ #!/bin/bash options=("MySQL" "PostgreSQL" "Redis" "MongoDB" "MariaDB") -choices=$(printf "%s\n" "${options[@]}" | gum choose --no-limit --header "Select databases (space to select, return to install, esc to cancel)") || main_menu + +if [[ "$#" -eq 0 ]]; then + choices=$(printf "%s\n" "${options[@]}" | gum choose --no-limit --header "Select databases (space to select, return to install, esc to cancel)") || main_menu +else + choices="$@" +fi if [[ -n "$choices" ]]; then for db in $choices; do