瀏覽代碼

add active directory sync scripts

Noah Vogt 5 月之前
父節點
當前提交
b742019f54
共有 2 個文件被更改,包括 30 次插入0 次删除
  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"