Fix ruby (#6)
* test: don't use ruby on install run * chore: error checking * chore: stability fixes * chore: fix bugs and don't require ruby anymorepull/7/head
parent
3e1970c6c7
commit
b260e9af4a
@ -1,20 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
export NVM_DIR="$HOME/.config/.nvm"
|
||||
export NVM_DIR="$HOME/.config/.nvm";
|
||||
|
||||
if ! [[ -d ${NVM_DIR} ]]; then
|
||||
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};
|
||||
else
|
||||
source ${NVM_DIR}/nvm.sh;
|
||||
fi
|
||||
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion";
|
||||
if [[ -s "${NVM_DIR}/nvm.sh" ]]; then
|
||||
source ${NVM_DIR}/nvm.sh;
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion";
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
@ -1,19 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
export RVM_HOME="${HOME}/.rvm"
|
||||
|
||||
if ! [[ -d "${RVM_HOME}" ]]; then
|
||||
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 -;
|
||||
|
||||
curl -sSL https://get.rvm.io | bash -s stable --ruby;
|
||||
source ${RVM_HOME}/scripts/rvm;
|
||||
rvm use ruby-3.0.0;
|
||||
source ${RVM_HOME}/scripts/completion;
|
||||
else
|
||||
echo "rvm_silence_path_mismatch_check_flag=1" > ~/.rvmrc;
|
||||
source ${RVM_HOME}/scripts/rvm;
|
||||
rvm use ruby-3.0.0 > /dev/null;
|
||||
source ${RVM_HOME}/scripts/completion;
|
||||
fi
|
||||
|
||||
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
|
||||
|
||||
|
@ -1,23 +1,47 @@
|
||||
#!/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"
|
||||
|
||||
files_linkdir "/usr/share/vim/vim82/" "${VIMRUNTIME}";
|
||||
if [[ -d ${VIM} ]]; then
|
||||
|
||||
! [[ -f ${HOME}/.vimrc ]] && ln -s ${VIM}/.vimrc ${HOME}/.vimrc;
|
||||
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}/";
|
||||
|
||||
! [[ -f ${HOME}/.vimrc ]] && ln -sf ${VIM}/.vimrc ${HOME}/.vimrc;
|
||||
|
||||
if ! [[ -f "${VIMRUNTIME}/autoload/pathogen.vim" ]]; then
|
||||
! [[ -d "/tmp/vim-pathogen" ]] && git clone git://github.com/tpope/vim-pathogen.git /tmp/vim-pathogen;
|
||||
cp -r /tmp/vim-pathogen/autoload/* ${VIMRUNTIME}/autoload;
|
||||
files_debug_log "installing pathogen.vim";
|
||||
if ! [[ -d "/tmp/vim-pathogen/" ]]; then
|
||||
git clone git://github.com/tpope/vim-pathogen.git /tmp/vim-pathogen;
|
||||
if [[ -d "/tmp/vim-pathogen/autoload" ]]; then
|
||||
mkdir -p ${VIMRUNTIME}/autoload/;
|
||||
cp -r /tmp/vim-pathogen/autoload/* ${VIMRUNTIME}/autoload/;
|
||||
fi
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if ! [[ -d "${VIMRUNTIME}/bundle" ]]; then
|
||||
pushd ${VIM}
|
||||
rake
|
||||
popd
|
||||
files_debug_log "installing vim plugins...";
|
||||
install_vim_plugins
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in new issue