You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.2 KiB

  1. #!/bin/sh
  2. DOTFILES_DIR="${HOME}/Software/dotfiles"
  3. declare -a FILES=(
  4. .bash_profile
  5. .bashrc
  6. .inputrc
  7. .iterm2_shell_integration.bash
  8. .xinitrc
  9. .config/aliasrc
  10. .config/nvim/init.lua
  11. .config/nvim/lua/general/remaps.lua
  12. .config/nvim/lua/general/options.lua
  13. .config/nvim/lua/general/autocmd.lua
  14. .config/nvim/lua/config/cmp.lua
  15. .config/nvim/lua/config/luasnip.lua
  16. .config/nvim/lua/config/lsp/init.lua
  17. .config/nvim/lua/config/lsp/installer.lua
  18. .config/nvim/lua/config/lsp/keymaps.lua
  19. .config/nvim/lua/utils/init.lua
  20. .config/nvim/lua/helper/toggle-tab-width.lua
  21. .config/nvim/plugin
  22. .config/nvim/lua/packer-plugins.lua
  23. .config/nvim/coc-settings.json
  24. .config/lf/
  25. .dwm/autostart.sh
  26. .dwm/dwm-sss
  27. .local/bin/
  28. .zsh/
  29. .zshrc
  30. )
  31. for F in ${FILES[@]}; do
  32. FILE="${HOME}/$F"
  33. if [[ ! -f $FILE && ! -d $FILE ]]; then
  34. continue
  35. fi
  36. if [[ -d $FILE ]]; then
  37. cp -r "${FILE}" "${DOTFILES_DIR}/$(dirname ${F})"
  38. continue
  39. fi
  40. cp -r "${FILE}" "${DOTFILES_DIR}/${F}"
  41. done
  42. cd $HOME/Software/dotfiles/
  43. git add .
  44. git commit -m "$(date)"
  45. git push origin $(git rev-parse --abbrev-ref HEAD)