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.

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