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.

check-diff.sh 654B

1234567891011121314151617181920212223242526272829303132333435
  1. #! /bin/sh
  2. #
  3. set -x
  4. if [ "$#" -eq 0 ] || [ "$#" -gt 1 ]; then
  5. echo takes only one argument
  6. exit 1
  7. fi
  8. if [ ! -e "${1}" ]; then
  9. echo cannot find "${1}"
  10. exit 1
  11. fi
  12. # shellcheck source=./env_files/checkdiff-example.env
  13. . "${1}"
  14. remote_copy_path=$(mktemp -d)
  15. rsync \
  16. --archive \
  17. --checksum \
  18. --human-readable \
  19. "${REMOTE_SSH_STRING}":"${REMOTE_ROOT_PATH}${FOLDER_PATH}/" \
  20. "${remote_copy_path}"
  21. local_copy_path=$(mktemp -d)
  22. rsync \
  23. --archive \
  24. --checksum \
  25. --exclude-from="${EXCLUDEFILE_PATH}" \
  26. --human-readable \
  27. "${LOCAL_ROOT_PATH}${FOLDER_PATH}/" \
  28. "${local_copy_path}"
  29. kdiff3 "${local_copy_path}" "${remote_copy_path}"