From 077998766ada0cdbe3df0b735c19b9f260ccc914 Mon Sep 17 00:00:00 2001 From: dhvcc Date: Wed, 3 Jul 2024 01:34:55 +0300 Subject: [PATCH] Try to fix install in docker, cleanup --- .cfg/Dockerfile | 40 +++++++++------------------------- .cfg/scripts/install-neovim.sh | 2 -- .cfg/scripts/install-omb.sh | 3 --- .cfg/scripts/install-omz.sh | 12 +++------- .cfg/setup.sh | 5 +++-- 5 files changed, 16 insertions(+), 46 deletions(-) diff --git a/.cfg/Dockerfile b/.cfg/Dockerfile index 16214d7..553c81e 100644 --- a/.cfg/Dockerfile +++ b/.cfg/Dockerfile @@ -3,39 +3,19 @@ FROM ubuntu:22.04 WORKDIR /root # ubuntu only -RUN apt update -RUN apt install -y curl git build-essential - +RUN apt update --fix-missing +RUN apt install -y curl git build-essential zsh # Install brew -RUN curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh | env NONINTERACTIVE=1 bash - -RUN echo 'export PATH="$PATH:/home/linuxbrew/.linuxbrew/bin"' >> "$HOME/.bashrc" -ENV PATH="$PATH:/home/linuxbrew/.linuxbrew/bin" - -RUN brew doctor - -# Xclip ubuntu only -RUN brew install unzip xclip vim neovim +ENV NONINTERACTIVE=1 +RUN curl -Lks -o install.sh https://raw.githubusercontent.com/dhvcc/configs/master/.cfg/install.sh && \ + chmod +x install.sh && \ + ./install.sh && \ + zsh -c "$HOME/.cfg/setup.sh" -RUN brew install starship neofetch fzf btop wget \ - pyenv nvm \ - lsd fd ripgrep bat `# rust utils` +#RUN echo 'export PATH="$PATH:/home/linuxbrew/.linuxbrew/bin"' >> "$HOME/.bashrc" +#ENV PATH="$PATH:/home/linuxbrew/.linuxbrew/bin" -# INSTALL VIM THINGS -RUN curl -fLo '~/.vim/autoload/plug.vim' --create-dirs \ - 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' - -RUN curl -Lks https://raw.githubusercontent.com/dhvcc/configs/master/.cfg/install.sh | /bin/sh - -# Install manually or in script -#ENV NVM_DIR="$HOME/.nvm" -#RUN test -s "/home/linuxbrew/.linuxbrew/opt/nvm/nvm.sh" && . "/home/linuxbrew/.linuxbrew/opt/nvm/nvm.sh"; nvm install 16 - -# ubuntu only -RUN apt install -y zsh -# -RUN "$HOME/.cfg/scripts/install-omb.sh" -RUN "$HOME/.cfg/scripts/install-omz.sh" +#RUN "$HOME/.cfg/setup.sh" CMD bash diff --git a/.cfg/scripts/install-neovim.sh b/.cfg/scripts/install-neovim.sh index a76a9ee..097e9d7 100755 --- a/.cfg/scripts/install-neovim.sh +++ b/.cfg/scripts/install-neovim.sh @@ -1,7 +1,5 @@ #!/usr/bin/env zsh -export PATH="/home/linuxbrew/.linuxbrew/bin:/opt/homebrew/bin:$PATH" - curl -fLo '~/.vim/autoload/plug.vim' --create-dirs \ 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' diff --git a/.cfg/scripts/install-omb.sh b/.cfg/scripts/install-omb.sh index 291463f..08be9c7 100755 --- a/.cfg/scripts/install-omb.sh +++ b/.cfg/scripts/install-omb.sh @@ -1,7 +1,4 @@ #!/usr/bin/env bash -export OSH=$HOME/.oh-my-bash -source $OSH/oh-my-bash.sh - bash -c "$(curl -fsSL https://raw.githubusercontent.com/ohmybash/oh-my-bash/master/tools/install.sh)" --unattended mv -f .bashrc.omb* .bashrc diff --git a/.cfg/scripts/install-omz.sh b/.cfg/scripts/install-omz.sh index 206aebb..ff2e1b3 100755 --- a/.cfg/scripts/install-omz.sh +++ b/.cfg/scripts/install-omz.sh @@ -1,13 +1,7 @@ #!/usr/bin/env zsh -export ZSH="$HOME/.oh-my-zsh" -export ZSH_CUSTOM="$HOME/.oh-my-zsh-custom" -ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#d1d1d1,bg=#525252" -fpath+="$ZSH_CUSTOM/plugins/zsh-completions/src" -source $ZSH/oh-my-zsh.sh - sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --keep-zshrc --unattended -git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting -git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions -git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions +git clone https://github.com/zsh-users/zsh-syntax-highlighting.git "$HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting" +git clone https://github.com/zsh-users/zsh-autosuggestions "$HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions" +git clone https://github.com/zsh-users/zsh-completions "$HOME/.oh-my-zsh/custom/plugins/zsh-completions" diff --git a/.cfg/setup.sh b/.cfg/setup.sh index 24754a7..6498e29 100755 --- a/.cfg/setup.sh +++ b/.cfg/setup.sh @@ -8,11 +8,12 @@ if test -f "$(which apt)"; then ${CMD} apt install -y zsh fi +export PATH="/home/linuxbrew/.linuxbrew/bin:/opt/homebrew/bin:$PATH" +export PATH="$HOME/.local/bin:$PATH" + ./.cfg/scripts/install-brew.sh ./.cfg/scripts/install-packages.sh -export PATH="$HOME/.local/bin:$PATH" - pip3 install pipx pipx install poetry --include-deps pipx install ansible --include-deps