Skip to content

Instantly share code, notes, and snippets.

@emersonmx
Last active January 7, 2021 02:43
Show Gist options
  • Select an option

  • Save emersonmx/4f9510819140d05dfa3e57b4cf875feb to your computer and use it in GitHub Desktop.

Select an option

Save emersonmx/4f9510819140d05dfa3e57b4cf875feb to your computer and use it in GitHub Desktop.

Revisions

  1. emersonmx revised this gist Jan 7, 2021. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions install-tools.sh
    Original file line number Diff line number Diff line change
    @@ -132,6 +132,7 @@ fi
    if [[ "$MANAGERS" == *"yarn"* ]]
    then
    yarn global upgrade \
    dockerfile-language-server-nodejs \
    intelephense \
    neovim
    fi
  2. emersonmx revised this gist Dec 31, 2020. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions install-tools.sh
    Original file line number Diff line number Diff line change
    @@ -25,6 +25,7 @@ then
    ffmpegthumbnailer \
    fzf \
    git \
    github-cli \
    go \
    go-tools \
    highlight \
  3. emersonmx created this gist Dec 31, 2020.
    158 changes: 158 additions & 0 deletions install-tools.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,158 @@
    #!/bin/bash

    MANAGERS=${MANAGERS:-"arch flatpak rust cargo golang pip yarn misc"}
    FORCE_INSTALL=${FORCE_INSTALL:-}

    echo "Managers enabled: $MANAGERS"

    function download_from_and_install_to() {
    curl -L -o $2 $1 && chmod +x $2
    }

    if [[ "$MANAGERS" == *"arch"* ]]
    then
    yay -Syu

    [[ ! -z "$FORCE_INSTALL" ]] && yay -S \
    alacritty \
    bat \
    ccls \
    chezmoi \
    cmake \
    earlyoom \
    exa \
    fd \
    ffmpegthumbnailer \
    fzf \
    git \
    go \
    go-tools \
    highlight \
    httpie \
    icat \
    jq \
    lastpass-cli \
    lld \
    neovim-remote \
    nodejs \
    noto-fonts-emoji \
    pass \
    perl-image-exiftool \
    python-cookiecutter \
    python-pip \
    python-poetry \
    python2-pip \
    qrencode \
    ranger \
    ripgrep \
    rofi \
    rofi-calc \
    rofi-emoji \
    semver \
    siji-git \
    subversion \
    tmuxp \
    trash-cli \
    ttf-fira-code \
    ttf-twemoji-color \
    vint \
    w3m \
    wmctrl \
    wmutils-git \
    xclip \
    xdotool \
    xsel \
    yapf \
    yarn \
    yq \
    ytop
    fi


    if [[ "$MANAGERS" == *"flatpak"* ]]
    then
    if [[ ! -z "$FORCE_INSTALL" ]]
    then
    flatpak install -y \
    com.getpostman.Postman \
    com.github.tchx84.Flatseal \
    org.kde.krita \
    org.mypaint.MyPaint \
    org.kde.kdenlive
    else
    flatpak update -y
    fi
    fi


    if [[ "$MANAGERS" == *"rust"* ]]
    then
    if [[ ! $(command -v rustup) || ! -z "$FORCE_INSTALL" ]]
    then
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
    fi

    rustup self update
    rustup update
    fi


    if [[ "$MANAGERS" == *"cargo"* ]]
    then
    cargo install --force \
    cargo-watch \
    tealdeer
    fi


    if [[ "$MANAGERS" == *"golang"* ]]
    then
    pkgman="go get -v -u"
    [[ ! -z "$FORCE_INSTALL" ]] && pkgman="go get -v"

    $pkgman \
    github.com/sourcegraph/go-langserver \
    github.com/mattn/efm-langserver \
    github.com/kisielk/errcheck \
    golang.org/x/lint/golint
    fi


    if [[ "$MANAGERS" == *"pip"* ]]
    then
    pkgman="pip install --user -U"
    [[ ! -z "$FORCE_INSTALL" ]] && pkgman="pip install --user"

    $pkgman \
    gdtoolkit
    fi


    if [[ "$MANAGERS" == *"yarn"* ]]
    then
    yarn global upgrade \
    intelephense \
    neovim
    fi


    if [[ "$MANAGERS" == *"misc"* ]]
    then
    download_from_and_install_to \
    https://raw.githubusercontent.com/emersonmx/scripts/master/tools/edit-config \
    $HOME/.local/bin/edit-config

    download_from_and_install_to \
    https://raw.githubusercontent.com/emersonmx/tmplt/master/tmplt \
    $HOME/.local/bin/tmplt

    zsh -i -c 'zinit self-update'
    zsh -i -c 'zinit update'

    nvim +PlugInstall +PlugUpdate +UpdateRemotePlugins +qall
    nvim +CocUpdateSync +qall
    $HOME/.tmux/plugins/tpm/scripts/update_plugin_prompt_handler.sh all

    python3 -m pip install --user --upgrade pynvim
    python2 -m pip install --user --upgrade pynvim
    fi