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.

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