PageRenderTime 157ms CodeModel.GetById 30ms RepoModel.GetById 0ms app.codeStats 0ms

/run_once_install-packages.sh.tmpl

https://github.com/tylerball/dotfiles
Go Template | 82 lines | 77 code | 5 blank | 0 comment | 2 complexity | 94acca1122527b4329bdeeff4514cf5c MD5 | raw file
  1. {{ if eq .chezmoi.os "linux" -}}
  2. #!/bin/bash
  3. sudo apt update
  4. if [[ ! -x `which rg` ]]; then
  5. curl -LO https://github.com/BurntSushi/ripgrep/releases/download/11.0.2/ripgrep_11.0.2_amd64.deb
  6. sudo dpkg -i ripgrep_11.0.2_amd64.deb
  7. fi
  8. {{ else if eq .chezmoi.os "darwin" -}}
  9. #!/bin/sh
  10. if [[ ! -x `which brew` ]]; then
  11. ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  12. fi
  13. brew update
  14. brew tap homebrew/cask
  15. brew tap neovim/neovim
  16. brew tap homebrew/cask-fonts
  17. brew tap Goles/battery
  18. brew install git \
  19. node \
  20. python \
  21. tmux \
  22. tree \
  23. zsh \
  24. fasd \
  25. mpd \
  26. mpc \
  27. ncmpcpp \
  28. fzf \
  29. gawk \
  30. neovim \
  31. ansiweather \
  32. exif \
  33. mackup \
  34. ripgrep \
  35. reattach-to-user-namespace \
  36. mas \
  37. urlview \
  38. ranger \
  39. ruby-install \
  40. chruby \
  41. hub \
  42. mosh \
  43. tinc \
  44. battery \
  45. go \
  46. github/gh/gh \
  47. telnet
  48. brew cask install tunnelblick \
  49. hammerspoon \
  50. dash \
  51. alfred \
  52. iterm2 \
  53. syncthing \
  54. homebrew/cask-fonts/font-hack
  55. mas install 890031187 # Marked 2
  56. mas install 411643860 # DaisyDisk
  57. mas install 557168941 # Tweetbot
  58. mas install 413965349 # Soulver
  59. mas install 1435957248 # Drafts
  60. {{ end -}}
  61. if [[ ! -f $HOME/.config/nvim/autoload/plug.vim ]]; then
  62. curl -Lk https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim > $HOME/.config/nvim/autoload/plug.vim
  63. fi
  64. if [[ ! -f $HOME/.local/share/nvim/site/pack/packer/opt/packer.nvim ]]; then
  65. mkdir -p $HOME/.local/share/nvim/site/pack/packer/opt
  66. git clone --depth 1 https://github.com/wbthomason/packer.nvim > $HOME/.local/share/nvim/site/pack/packer/opt/packer.nvim
  67. fi
  68. while read line; do
  69. DEST="$(cut -d',' -f1 <<<"$line")"
  70. URL="$(cut -d',' -f2 <<<"$line")"
  71. echo $URL
  72. if [[ -d $DEST ]]; then
  73. git --work-tree $DEST --git-dir $DEST/.git pull origin master
  74. else
  75. git clone "${URL}" "${HOME}/${DEST}"
  76. fi
  77. done < "$(chezmoi source-path)/plugins.csv"