diff --git a/setup/config.zsh b/setup/config.zsh index d27df6c..80c729f 100644 --- a/setup/config.zsh +++ b/setup/config.zsh @@ -34,6 +34,8 @@ CONFIG__VIM() { CONFIG__ENV vim || return 1 CONFIG__RC vim || return 2 + [ $NO_COMPILE_VIM ] && return 0 + __STATUS 'starting vim setup' "$DOTWRYN_PATH/vim/update" \ && __SUCCESS 'completed vim setup' \ diff --git a/setup/os.zsh b/setup/os.zsh index 33bcae6..131dc16 100644 --- a/setup/os.zsh +++ b/setup/os.zsh @@ -1,6 +1,7 @@ ##################################################################### SETUP__OS() { + [ $CI ] && { __STATUS 'detected CI; skipping os setup'; return 0; } __GETSUDO local OS_NAME=$(OS__GET_OS) diff --git a/setup/requirements.zsh b/setup/requirements.zsh index 2115b3a..8322858 100644 --- a/setup/requirements.zsh +++ b/setup/requirements.zsh @@ -1,4 +1,5 @@ -[[ $EUID -eq 0 ]] && { echo 'ERROR::Setup cannot be run as root'; exit 1; } +[[ $EUID -eq 0 ]] && [ ! $FORCE_ROOT ] \ + && { echo 'ERROR::Setup cannot be run as root'; exit 1; } ##################################################################### diff --git a/setup/run b/setup/run index 5dd5e2a..cf840b3 100755 --- a/setup/run +++ b/setup/run @@ -1,4 +1,16 @@ #!/bin/zsh +while [[ $# -gt 0 ]] +do + case $1 in + --no-compile-vim ) NO_COMPILE_VIM=1 ;; + --ci ) export CI=1 ;; + --force-root ) FORCE_ROOT=1 ;; + --no-fluff ) + NO_COMPILE_VIM=1 + ;; + esac + shift 1 +done source ${0:a:h}/requirements.zsh || exit 1 ################################################################################