From d497156be9d1444e69e2ed52b1fd5a14dc048cd2 Mon Sep 17 00:00:00 2001 From: David Kebler Date: Tue, 27 Feb 2024 18:55:57 -0800 Subject: [PATCH] allow force install --- modules/uci-shell-install.lib | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/uci-shell-install.lib b/modules/uci-shell-install.lib index de8bebf..b4c795d 100644 --- a/modules/uci-shell-install.lib +++ b/modules/uci-shell-install.lib @@ -21,10 +21,10 @@ # must! be run as sudo install_shell_base () { - if [[ $BASH_SHELL_BASE ]]; then + if [[ $BASH_SHELL_BASE ]] && [[ -d $BASH_SHELL_BASE ]]; then echo appears that UCI shell base is already installed at $BASH_SHELL_BASE echo upgrade instead using: 'module_load uci-shell-install; update_shell_base' - return 1 + [[ $1 == "-f" ]] && { shift; echo forcing reinstall; } || return 1 fi if [[ ! $BASH_SHELL_GIT_URL ]]; then echo BASH_SHELL_GIT_URL must be set before install can proceed