Explorar el Código

add active directory sync scripts

Noah Vogt hace 5 meses
padre
commit
b742019f54
Se han modificado 2 ficheros con 30 adiciones y 0 borrados
  1. 15 0
      local-bin/eana_sync
  2. 15 0
      local-bin/oop2_sync

+ 15 - 0
local-bin/eana_sync

@@ -0,0 +1,15 @@
+#!/bin/sh
+
+SRC_DIR="/mnt/fhnwdata/HSI/E2411_Unterrichte_Bachelor/E2411_Unterrichte_I/3iCa/eana/"
+TARGET_DIR="$HOME/dox/fh/eana/ad/"
+
+error_msg() {
+    echo "Error: $1" >&2
+    exit 1
+}
+
+command -v "rsync" > /dev/null || error_msg "Could not find 'rsync' executable"
+
+[ -d "$SRC_DIR" ] || error_msg "Could not access '$SRC_DIR'"
+
+rsync -uvrP "$SRC_DIR" "$TARGET_DIR"

+ 15 - 0
local-bin/oop2_sync

@@ -0,0 +1,15 @@
+#!/bin/sh
+
+SRC_DIR="/mnt/fhnwdata/HSI/E2411_Unterrichte_Bachelor/E2411_Unterrichte_I/1Ia/oopI2/"
+TARGET_DIR="$HOME/dox/fh/oop2/ad/"
+
+error_msg() {
+    echo "Error: $1" >&2
+    exit 1
+}
+
+command -v "rsync" > /dev/null || error_msg "Could not find 'rsync' executable"
+
+[ -d "$SRC_DIR" ] || error_msg "Could not access '$SRC_DIR'"
+
+rsync -uvrP "$SRC_DIR" "$TARGET_DIR"