git-hook-backup-transmission.sh 517 B

1234567891011121314151617181920212223
  1. #!/usr/bin/env bash
  2. # partial_path=".config/transmission-daemon/torrents"
  3. # home_path="${HOME}/${partial_path}"
  4. # dotfiles_path="${HOME}/.dotfiles/${partial_path}"
  5. # archive="transmission-daemon.backup.tar.gz"
  6. # cd "$home_path"
  7. # tar caf "$archive" *.torrent
  8. # mv "$archive" "$dotfiles_path"
  9. # cd "$dotfiles_path"
  10. # git add "$archive"
  11. archive="transmission-daemon.backup.tar.gz"
  12. DIR="$PWD"
  13. cd ~/.config/
  14. tar caf "$archive" ./transmission-daemon
  15. mv "$archive" "${DIR}/.misc/"
  16. cd "${DIR}/.misc"
  17. git add "$archive"