setup 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #!/usr/bin/env bash
  2. set -euxo pipefail
  3. git submodule init
  4. (cd tintin && git fetch --all --prune)
  5. git submodule update --remote
  6. paths='/usr/local /opt/homebrew /usr/pkg'
  7. for path in $paths; do
  8. if [ -d $path/include ]; then
  9. export CFLAGS="${CFLAGS:+$CFLAGS }-I$path/include"
  10. export CPPFLAGS="${CPPFLAGS:+$CPPFLAGS }-I$path/include"
  11. export LDFLAGS="${LDFLAGS:+$LDFLAGS }-L$path/lib"
  12. fi
  13. done
  14. (cd tintin/src && ./configure && make)
  15. cp tintin/src/tt++ bin/ || exit
  16. if [ -L var -a -d "$(readlink var)" ]; then
  17. mkdir -p var/ids
  18. mkdir -p var/etc
  19. mkdir -p var/data
  20. mkdir -p var/log
  21. mkdir -p var/plugins
  22. else
  23. echo 请尽快建立 var 目录,以防止你的数据丢失。;
  24. echo 推荐将 var 目录建在别的地方,然后由 ./var 通过符号链接指向它。;
  25. fi
  26. mkdir -p .config/nvim
  27. ln -s ../../init.vim .config/nvim/init.vim
  28. mkdir -p .local/share/nvim/site/autoload/
  29. ln -s ../../plugged/vim-plug/plug.vim .local/share/nvim/site/autoload/plug.vim
  30. mkdir -p .local/share/nvim/plugged
  31. cd .local/share/nvim/plugged
  32. git clone --depth 1 https://mirror.ghproxy.com/https://github.com/junegunn/vim-plug.git
  33. git clone --depth 1 https://mirror.ghproxy.com/https://github.com/dzpao/vim-mbs.git
  34. git clone --depth 1 https://mirror.ghproxy.com/https://github.com/morhetz/gruvbox.git
  35. git clone --depth 1 https://mirror.ghproxy.com/https://github.com/yegappan/mru.git
  36. git clone --depth 1 https://mirror.ghproxy.com/https://github.com/jlanzarotta/BufExplorer.git
  37. git clone --depth 1 https://mirror.ghproxy.com/https://github.com/mhinz/vim-startify.git