oop2_sync 366 B

123456789101112131415
  1. #!/bin/sh
  2. SRC_DIR="/mnt/fhnwdata/HSI/E2411_Unterrichte_Bachelor/E2411_Unterrichte_I/1Ia/oopI2/"
  3. TARGET_DIR="$HOME/dox/fh/oop2/ad/"
  4. error_msg() {
  5. echo "Error: $1" >&2
  6. exit 1
  7. }
  8. command -v "rsync" > /dev/null || error_msg "Could not find 'rsync' executable"
  9. [ -d "$SRC_DIR" ] || error_msg "Could not access '$SRC_DIR'"
  10. rsync -uvrP "$SRC_DIR" "$TARGET_DIR"