diff --git a/Dockerfile b/Dockerfile index 88548f7..f5ab345 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,6 +16,7 @@ COPY --chown=1000:1000 . /home/files/.files USER 1000 RUN rm -rf .bash_rc .bash_logout .zshrc \ && source /home/files/.files/sourceme.sh \ - && echo "source /home/files/.files/sourceme.sh" > /home/files/.bash_profile + && echo "source /home/files/.files/sourceme.sh" > /home/files/.bash_profile \ + && rm -rf .profile .zlogin .zshrc .bashrc mkshrc CMD ["bash", "--login"] diff --git a/plugins/210-node.sh b/plugins/210-node.sh index bb997ca..8b95830 100644 --- a/plugins/210-node.sh +++ b/plugins/210-node.sh @@ -5,8 +5,7 @@ export NVM_DIR="$HOME/.config/.nvm"; if [[ "${FILES_INSTALL_TOOLS}" = "true" ]] && ! [[ -d ${NVM_DIR} ]]; then # install node version manager echo "Installing node version manager"; - git clone https://github.com/nvm-sh/nvm.git ${NVM_DIR} - git checkout "${NVM_VERSION:-v0.39.0}" + git clone --branch "${NVM_VERSION:-v0.39.0}" https://github.com/nvm-sh/nvm.git ${NVM_DIR}; source ${NVM_DIR}/nvm.sh; nvm install ${NVM_VERSION:-v14}; nvm alias default ${NVM_VERSION:-v14}; @@ -15,7 +14,6 @@ fi if [[ -s "${NVM_DIR}/nvm.sh" ]]; then source ${NVM_DIR}/nvm.sh; [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"; - nvm use default; fi diff --git a/plugins/220-ruby.sh b/plugins/220-ruby.sh index 5424095..dd0d1bc 100644 --- a/plugins/220-ruby.sh +++ b/plugins/220-ruby.sh @@ -1,6 +1,7 @@ #!/bin/sh export RVM_HOME="${HOME}/.rvm"; +return 0; if [[ "${FILES_INSTALL_TOOLS}" = "true" ]] && ! [[ -d "${RVM_HOME}" ]]; then command curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -; command curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -; @@ -12,6 +13,7 @@ if [[ -s ${RVM_HOME}/scripts/rvm ]]; then ! [[ -f ${HOME}/.rvmrc ]] && echo "rvm_silence_path_mismatch_check_flag=1" > ~/.rvmrc; source ${RVM_HOME}/scripts/rvm; [[ -s ${RVM_HOME}/scripts/completion ]] && source ${RVM_HOME}/scripts/completion | true; + export PATH=$PATH:$HOME/.rvm/bin; rvm use ruby-3.0.0 > /dev/null; fi diff --git a/plugins/500-vim.sh b/plugins/500-vim.sh index 6e27429..80fa36a 100644 --- a/plugins/500-vim.sh +++ b/plugins/500-vim.sh @@ -1,9 +1,26 @@ #!/bin/sh -if [[ -d "${HOME}/.config/vim" ]]; then - export VIM=${HOME}/.config/vim; - export VIMRUNTIME=${VIM}/runtime; - # export PATH=${VIM}:${PATH}; +export VIM="${HOME}/.config/vim"; +export VIMRUNTIME="${VIM}/runtime"; +export VIM_BUNDLE="${VIM}/runtime/bundle" + +if [[ -d ${VIM} ]]; then + + install_vim_plugins() { + [[ -d ${VIM_BUNDLE} ]] && rm -rf ${VIM_BUNDLE}; + mkdir -p ${VIM_BUNDLE}; + + pushd ${VIM_BUNDLE} + local PLUGINS=$(cat ${VIM}/plugins.txt); + for plugin in ${PLUGINS}; do + if [[ "${plugin:0:3}" = "git" ]]; then + echo "Installing $plugin..."; + git clone -q $plugin > /dev/null & + fi + done + time wait; + popd; + } files_linkdir "/usr/share/vim/vim82/" "${VIMRUNTIME}/"; @@ -23,9 +40,7 @@ if [[ -d "${HOME}/.config/vim" ]]; then if ! [[ -d "${VIMRUNTIME}/bundle" ]]; then files_debug_log "installing vim plugins..."; - pushd ${VIM}; - [[ -f "$(which rake)" ]] && rake; - popd; + install_vim_plugins fi fi