/run_once_install-packages.sh.tmpl
Go Template | 82 lines | 77 code | 5 blank | 0 comment | 2 complexity | 94acca1122527b4329bdeeff4514cf5c MD5 | raw file
- {{ if eq .chezmoi.os "linux" -}}
- #!/bin/bash
- sudo apt update
- if [[ ! -x `which rg` ]]; then
- curl -LO https://github.com/BurntSushi/ripgrep/releases/download/11.0.2/ripgrep_11.0.2_amd64.deb
- sudo dpkg -i ripgrep_11.0.2_amd64.deb
- fi
- {{ else if eq .chezmoi.os "darwin" -}}
- #!/bin/sh
- if [[ ! -x `which brew` ]]; then
- ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- fi
- brew update
- brew tap homebrew/cask
- brew tap neovim/neovim
- brew tap homebrew/cask-fonts
- brew tap Goles/battery
- brew install git \
- node \
- python \
- tmux \
- tree \
- zsh \
- fasd \
- mpd \
- mpc \
- ncmpcpp \
- fzf \
- gawk \
- neovim \
- ansiweather \
- exif \
- mackup \
- ripgrep \
- reattach-to-user-namespace \
- mas \
- urlview \
- ranger \
- ruby-install \
- chruby \
- hub \
- mosh \
- tinc \
- battery \
- go \
- github/gh/gh \
- telnet
- brew cask install tunnelblick \
- hammerspoon \
- dash \
- alfred \
- iterm2 \
- syncthing \
- homebrew/cask-fonts/font-hack
- mas install 890031187 # Marked 2
- mas install 411643860 # DaisyDisk
- mas install 557168941 # Tweetbot
- mas install 413965349 # Soulver
- mas install 1435957248 # Drafts
- {{ end -}}
- if [[ ! -f $HOME/.config/nvim/autoload/plug.vim ]]; then
- curl -Lk https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim > $HOME/.config/nvim/autoload/plug.vim
- fi
- if [[ ! -f $HOME/.local/share/nvim/site/pack/packer/opt/packer.nvim ]]; then
- mkdir -p $HOME/.local/share/nvim/site/pack/packer/opt
- git clone --depth 1 https://github.com/wbthomason/packer.nvim > $HOME/.local/share/nvim/site/pack/packer/opt/packer.nvim
- fi
- while read line; do
- DEST="$(cut -d',' -f1 <<<"$line")"
- URL="$(cut -d',' -f2 <<<"$line")"
- echo $URL
- if [[ -d $DEST ]]; then
- git --work-tree $DEST --git-dir $DEST/.git pull origin master
- else
- git clone "${URL}" "${HOME}/${DEST}"
- fi
- done < "$(chezmoi source-path)/plugins.csv"