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