* test: don't use ruby on install run

* chore: error checking

* chore: stability fixes

* chore: fix bugs and don't require ruby anymore
pull/7/head
Adam Veldhousen 3 years ago committed by GitHub
parent 3e1970c6c7
commit b260e9af4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -8,7 +8,7 @@ execute pathogen#helptags()
set nocompatible
"color schemes
colorscheme torte
"colorscheme torte
"colorscheme jellybeans
"colorscheme molokai
"colorscheme wombat256i
@ -154,7 +154,7 @@ map <leader>s <Plug>(easymotion-s2)
nmap <leader>n :NERDTreeToggle %:p:h<CR>
nmap <leader>m :NERDTreeClose<CR>:NERDTreeFind<CR>
let g:NERDTreeBookmarksFile = ~/.config/vim/.NERDTreeBookmarks
" let g:NERDTreeBookmarksFile = ~/.config/vim/.NERDTreeBookmarks
" strips whitespace
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/vim-ruby/vim-ruby.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/mxw/vim-jsx.git
git://github.com/gorodinskiy/vim-coloresque.git
git://github.com/groenewege/vim-less.git
git://github.com/tpope/vim-markdown.git
git://github.com/tpope/vim-haml.git
#git://github.com/tpope/vim-haml.git
#themes
git://github.com/wdhg/dragon-energy.git
git://github.com/FrancescoMagliocco/CmptrClr.git

@ -1,6 +1,8 @@
FROM archlinux:latest
ARG INSTALL_TOOLS 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 \
&& echo '%sudo ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers \
@ -14,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"]

@ -7,7 +7,6 @@ files_linkdir() {
local FORCE=$3;
if [[ -d "${SOURCE}" ]]; then
files_debug_log "$SOURCE EXISTS, force=${FORCE} should run? $(! [[ -z "${FORCE}" ]] && echo "yes")"
if ! [[ -z "${FORCE}" ]] || ! [[ -d "${DEST}" ]]; then
files_debug_log "LINKING $SOURCE -> $DEST"

@ -2,4 +2,4 @@
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"
if ! [[ -f ~/.gvm/scripts/gvm ]]; then
if [[ "${FILES_INSTALL_TOOLS}" = "true" ]] && ! [[ -d ${GVM_DIR} ]]; then
# install 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;
@ -10,8 +10,10 @@ if ! [[ -f ~/.gvm/scripts/gvm ]]; then
source ~/.gvm/scripts/gvm;
gvm install go1.17 -B;
gvm use go1.17 --default;
else
fi
if [[ -s "${GVM_DIR}/scripts/gvm" ]]; then
source ~/.gvm/scripts/gvm;
[ -s "$GVM_DIR/scripts/bash_completion" ] && \. "$GVM_DIR/scripts/bash_completion";
fi
[ -s "$GVM_DIR/scripts/bash_completion" ] && \. "$GVM_DIR/scripts/bash_completion";

@ -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

@ -4,14 +4,13 @@ export RUSTUP_HOME="${HOME}/.config/rust/.rustup";
export CARGO_HOME="${HOME}/.config/rust/.cargo";
export PATH=${PATH}:${CARGO_HOME}/bin;
if ! [[ -d "${CARGO_HOME}" ]]; then
if [[ "${FILES_INSTALL_TOOLS}" = "true" ]] && ! [[ -d ${CARGO_HOME} ]]; then
# install rust
echo "Installing rustup + rust stable";
curl -sLSf https://sh.rustup.rs > /tmp/rustup.sh;
chmod +x /tmp/rustup.sh && /tmp/rustup.sh -y --no-modify-path;
source ${CARGO_HOME}/env
else
source ${CARGO_HOME}/env
fi
[[ -s "${CARGO_HOME}/env" ]] && source ${CARGO_HOME}/env;

@ -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

@ -1,5 +1,7 @@
#!/bin/sh
export FILES_INSTALL_TOOLS=${FILES_INSTALL_TOOLS:-false};
function files_debug_log() {
if ! [[ -z "${FILES_DEBUG}" ]]; then
echo -e "# [INFO] $@";
@ -38,4 +40,5 @@ function reload_env() {
fi
}
reload_env

Loading…
Cancel
Save