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.

46 lines
964 B

  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/helper/toggle-tab-width.lua
  15. .config/nvim/plugin
  16. .config/nvim/lua/packer-plugins.lua
  17. .config/nvim/coc-settings.json
  18. .config/lf/
  19. .dwm/autostart.sh
  20. .dwm/dwm-sss
  21. .local/bin/
  22. .zsh/
  23. .zshrc
  24. )
  25. for F in ${FILES[@]}; do
  26. FILE="${HOME}/$F"
  27. if [[ ! -f $FILE && ! -d $FILE ]]; then
  28. continue
  29. fi
  30. if [[ -d $FILE ]]; then
  31. cp -r "${FILE}" "${DOTFILES_DIR}/$(dirname ${F})"
  32. continue
  33. fi
  34. cp -r "${FILE}" "${DOTFILES_DIR}/${F}"
  35. done
  36. cd $HOME/Software/dotfiles/
  37. git add .
  38. git commit -m "$(date)"
  39. git push origin $(git rev-parse --abbrev-ref HEAD)