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.

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