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
|
|
@ -8,7 +8,7 @@ execute pathogen#helptags()
|
||||||
set nocompatible
|
set nocompatible
|
||||||
|
|
||||||
"color schemes
|
"color schemes
|
||||||
colorscheme torte
|
"colorscheme torte
|
||||||
"colorscheme jellybeans
|
"colorscheme jellybeans
|
||||||
"colorscheme molokai
|
"colorscheme molokai
|
||||||
"colorscheme wombat256i
|
"colorscheme wombat256i
|
||||||
|
|
@ -154,7 +154,7 @@ map <leader>s <Plug>(easymotion-s2)
|
||||||
nmap <leader>n :NERDTreeToggle %:p:h<CR>
|
nmap <leader>n :NERDTreeToggle %:p:h<CR>
|
||||||
nmap <leader>m :NERDTreeClose<CR>:NERDTreeFind<CR>
|
nmap <leader>m :NERDTreeClose<CR>:NERDTreeFind<CR>
|
||||||
|
|
||||||
let g:NERDTreeBookmarksFile = ~/.config/vim/.NERDTreeBookmarks
|
" let g:NERDTreeBookmarksFile = ~/.config/vim/.NERDTreeBookmarks
|
||||||
|
|
||||||
" strips whitespace
|
" strips whitespace
|
||||||
noremap <leader>ws :call StripWhitespace()<CR>
|
noremap <leader>ws :call StripWhitespace()<CR>
|
||||||
|
|
|
||||||
|
|
@ -22,13 +22,13 @@ git://github.com/cakebaker/scss-syntax.vim.git
|
||||||
git://github.com/pangloss/vim-javascript.git
|
git://github.com/pangloss/vim-javascript.git
|
||||||
git://github.com/vim-ruby/vim-ruby.git
|
git://github.com/vim-ruby/vim-ruby.git
|
||||||
git://github.com/vim-scripts/matchit.zip.git
|
git://github.com/vim-scripts/matchit.zip.git
|
||||||
git://github.com/oscarh/vimerl.git
|
#git://github.com/oscarh/vimerl.git
|
||||||
git://github.com/sukima/xmledit.git
|
git://github.com/sukima/xmledit.git
|
||||||
git://github.com/mxw/vim-jsx.git
|
git://github.com/mxw/vim-jsx.git
|
||||||
git://github.com/gorodinskiy/vim-coloresque.git
|
git://github.com/gorodinskiy/vim-coloresque.git
|
||||||
git://github.com/groenewege/vim-less.git
|
git://github.com/groenewege/vim-less.git
|
||||||
git://github.com/tpope/vim-markdown.git
|
git://github.com/tpope/vim-markdown.git
|
||||||
git://github.com/tpope/vim-haml.git
|
#git://github.com/tpope/vim-haml.git
|
||||||
#themes
|
#themes
|
||||||
git://github.com/wdhg/dragon-energy.git
|
git://github.com/wdhg/dragon-energy.git
|
||||||
git://github.com/FrancescoMagliocco/CmptrClr.git
|
git://github.com/FrancescoMagliocco/CmptrClr.git
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
FROM archlinux:latest
|
FROM archlinux:latest
|
||||||
|
|
||||||
|
ARG INSTALL_TOOLS true
|
||||||
ENV FILES_DEBUG true
|
ENV FILES_DEBUG true
|
||||||
|
ENV FILES_INSTALL_TOOLS ${INSTALL_TOOLS:-true}
|
||||||
|
|
||||||
RUN pacman -Sy --noconfirm openssh sudo vim git which gnupg make gcc binutils bison \
|
RUN pacman -Sy --noconfirm openssh sudo vim git which gnupg make gcc binutils bison \
|
||||||
&& echo '%sudo ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers \
|
&& echo '%sudo ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers \
|
||||||
|
|
@ -14,6 +16,7 @@ COPY --chown=1000:1000 . /home/files/.files
|
||||||
USER 1000
|
USER 1000
|
||||||
RUN rm -rf .bash_rc .bash_logout .zshrc \
|
RUN rm -rf .bash_rc .bash_logout .zshrc \
|
||||||
&& source /home/files/.files/sourceme.sh \
|
&& 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"]
|
CMD ["bash", "--login"]
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ files_linkdir() {
|
||||||
local FORCE=$3;
|
local FORCE=$3;
|
||||||
|
|
||||||
if [[ -d "${SOURCE}" ]]; then
|
if [[ -d "${SOURCE}" ]]; then
|
||||||
files_debug_log "$SOURCE EXISTS, force=${FORCE} should run? $(! [[ -z "${FORCE}" ]] && echo "yes")"
|
|
||||||
|
|
||||||
if ! [[ -z "${FORCE}" ]] || ! [[ -d "${DEST}" ]]; then
|
if ! [[ -z "${FORCE}" ]] || ! [[ -d "${DEST}" ]]; then
|
||||||
files_debug_log "LINKING $SOURCE -> $DEST"
|
files_debug_log "LINKING $SOURCE -> $DEST"
|
||||||
|
|
|
||||||
|
|
@ -2,4 +2,4 @@
|
||||||
|
|
||||||
files_linkdir "${HOME}/.files/.config" "${HOME}/.config" true;
|
files_linkdir "${HOME}/.files/.config" "${HOME}/.config" true;
|
||||||
|
|
||||||
! [[ -f "${HOME}/.gitconfig" ]] && ln -svf "${HOME}/.config/git/.gitconfig" "${HOME}/.gitconfig";
|
! [[ -f "${HOME}/.gitconfig" ]] && ln -s "${HOME}/.config/git/.gitconfig" "${HOME}/.gitconfig";
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
export GVM_DIR="${HOME}/.gvm"
|
export GVM_DIR="${HOME}/.gvm"
|
||||||
|
|
||||||
if ! [[ -f ~/.gvm/scripts/gvm ]]; then
|
if [[ "${FILES_INSTALL_TOOLS}" = "true" ]] && ! [[ -d ${GVM_DIR} ]]; then
|
||||||
# install go version manager
|
# install go version manager
|
||||||
echo "Installing go version manager";
|
echo "Installing go version manager";
|
||||||
curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer -o /tmp/gvm-installer.sh;
|
curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer -o /tmp/gvm-installer.sh;
|
||||||
|
|
@ -10,8 +10,10 @@ if ! [[ -f ~/.gvm/scripts/gvm ]]; then
|
||||||
source ~/.gvm/scripts/gvm;
|
source ~/.gvm/scripts/gvm;
|
||||||
gvm install go1.17 -B;
|
gvm install go1.17 -B;
|
||||||
gvm use go1.17 --default;
|
gvm use go1.17 --default;
|
||||||
else
|
|
||||||
source ~/.gvm/scripts/gvm;
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -s "${GVM_DIR}/scripts/gvm" ]]; then
|
||||||
|
source ~/.gvm/scripts/gvm;
|
||||||
[ -s "$GVM_DIR/scripts/bash_completion" ] && \. "$GVM_DIR/scripts/bash_completion";
|
[ -s "$GVM_DIR/scripts/bash_completion" ] && \. "$GVM_DIR/scripts/bash_completion";
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,20 @@
|
||||||
#!/bin/sh
|
#!/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
|
# install node version manager
|
||||||
echo "Installing node version manager";
|
echo "Installing node version manager";
|
||||||
git clone https://github.com/nvm-sh/nvm.git ${NVM_DIR}
|
git clone --branch "${NVM_VERSION:-v0.39.0}" https://github.com/nvm-sh/nvm.git ${NVM_DIR};
|
||||||
git checkout "${NVM_VERSION:-v0.39.0}"
|
|
||||||
source ${NVM_DIR}/nvm.sh;
|
source ${NVM_DIR}/nvm.sh;
|
||||||
nvm install ${NVM_VERSION:-v14};
|
nvm install ${NVM_VERSION:-v14};
|
||||||
nvm alias default ${NVM_VERSION:-v14};
|
nvm alias default ${NVM_VERSION:-v14};
|
||||||
else
|
|
||||||
source ${NVM_DIR}/nvm.sh;
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -s "${NVM_DIR}/nvm.sh" ]]; then
|
||||||
|
source ${NVM_DIR}/nvm.sh;
|
||||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion";
|
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion";
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,19 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
export RVM_HOME="${HOME}/.rvm"
|
export RVM_HOME="${HOME}/.rvm";
|
||||||
|
return 0;
|
||||||
if ! [[ -d "${RVM_HOME}" ]]; then
|
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/mpapis.asc | gpg2 --import -;
|
||||||
command curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -;
|
command curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -;
|
||||||
|
|
||||||
curl -sSL https://get.rvm.io | bash -s stable --ruby;
|
curl -sSL https://get.rvm.io | bash -s stable --ruby;
|
||||||
source ${RVM_HOME}/scripts/rvm;
|
fi
|
||||||
rvm use ruby-3.0.0;
|
|
||||||
source ${RVM_HOME}/scripts/completion;
|
if [[ -s ${RVM_HOME}/scripts/rvm ]]; then
|
||||||
else
|
! [[ -f ${HOME}/.rvmrc ]] && echo "rvm_silence_path_mismatch_check_flag=1" > ~/.rvmrc;
|
||||||
echo "rvm_silence_path_mismatch_check_flag=1" > ~/.rvmrc;
|
source ${RVM_HOME}/scripts/rvm;
|
||||||
source ${RVM_HOME}/scripts/rvm;
|
[[ -s ${RVM_HOME}/scripts/completion ]] && source ${RVM_HOME}/scripts/completion | true;
|
||||||
rvm use ruby-3.0.0 > /dev/null;
|
export PATH=$PATH:$HOME/.rvm/bin;
|
||||||
source ${RVM_HOME}/scripts/completion;
|
rvm use ruby-3.0.0 > /dev/null;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,14 +4,13 @@ export RUSTUP_HOME="${HOME}/.config/rust/.rustup";
|
||||||
export CARGO_HOME="${HOME}/.config/rust/.cargo";
|
export CARGO_HOME="${HOME}/.config/rust/.cargo";
|
||||||
export PATH=${PATH}:${CARGO_HOME}/bin;
|
export PATH=${PATH}:${CARGO_HOME}/bin;
|
||||||
|
|
||||||
if ! [[ -d "${CARGO_HOME}" ]]; then
|
if [[ "${FILES_INSTALL_TOOLS}" = "true" ]] && ! [[ -d ${CARGO_HOME} ]]; then
|
||||||
# install rust
|
# install rust
|
||||||
echo "Installing rustup + rust stable";
|
echo "Installing rustup + rust stable";
|
||||||
curl -sLSf https://sh.rustup.rs > /tmp/rustup.sh;
|
curl -sLSf https://sh.rustup.rs > /tmp/rustup.sh;
|
||||||
chmod +x /tmp/rustup.sh && /tmp/rustup.sh -y --no-modify-path;
|
chmod +x /tmp/rustup.sh && /tmp/rustup.sh -y --no-modify-path;
|
||||||
source ${CARGO_HOME}/env
|
|
||||||
else
|
|
||||||
source ${CARGO_HOME}/env
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
[[ -s "${CARGO_HOME}/env" ]] && source ${CARGO_HOME}/env;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,47 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [[ -d "${HOME}/.config/vim" ]]; then
|
export VIM="${HOME}/.config/vim";
|
||||||
export VIM=${HOME}/.config/vim;
|
export VIMRUNTIME="${VIM}/runtime";
|
||||||
export VIMRUNTIME=${VIM}/runtime;
|
export VIM_BUNDLE="${VIM}/runtime/bundle"
|
||||||
# export PATH=${VIM}:${PATH};
|
|
||||||
|
|
||||||
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
|
if ! [[ -f "${VIMRUNTIME}/autoload/pathogen.vim" ]]; then
|
||||||
! [[ -d "/tmp/vim-pathogen" ]] && git clone git://github.com/tpope/vim-pathogen.git /tmp/vim-pathogen;
|
files_debug_log "installing pathogen.vim";
|
||||||
cp -r /tmp/vim-pathogen/autoload/* ${VIMRUNTIME}/autoload;
|
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
|
fi
|
||||||
|
|
||||||
if ! [[ -d "${VIMRUNTIME}/bundle" ]]; then
|
if ! [[ -d "${VIMRUNTIME}/bundle" ]]; then
|
||||||
pushd ${VIM}
|
files_debug_log "installing vim plugins...";
|
||||||
rake
|
install_vim_plugins
|
||||||
popd
|
fi
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
export FILES_INSTALL_TOOLS=${FILES_INSTALL_TOOLS:-false};
|
||||||
|
|
||||||
function files_debug_log() {
|
function files_debug_log() {
|
||||||
if ! [[ -z "${FILES_DEBUG}" ]]; then
|
if ! [[ -z "${FILES_DEBUG}" ]]; then
|
||||||
echo -e "# [INFO] $@";
|
echo -e "# [INFO] $@";
|
||||||
|
|
@ -38,4 +40,5 @@ function reload_env() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
reload_env
|
reload_env
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue