Explorar o código

add sync scripts

Noah Vogt hai 20 horas
pai
achega
6f76f2e9f8
Modificáronse 3 ficheiros con 45 adicións e 0 borrados
  1. 15 0
      local-bin/dawr_sync
  2. 15 0
      local-bin/dist_sync
  3. 15 0
      local-bin/prcpp_sync

+ 15 - 0
local-bin/dawr_sync

@@ -0,0 +1,15 @@
+#!/bin/sh
+
+SRC_DIR="/mnt/fhnwdata/HSI/E2411_Unterrichte_Bachelor/E2411_Unterrichte_I/4ib/dawr/"
+TARGET_DIR="$HOME/dox/fh/dawr/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/dist_sync

@@ -0,0 +1,15 @@
+#!/bin/sh
+
+SRC_DIR="/mnt/fhnwdata/HSI/E2411_Unterrichte_Bachelor/E2411_Unterrichte_I/6iCbb/dist/"
+TARGET_DIR="$HOME/dox/fh/dist/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/prcpp_sync

@@ -0,0 +1,15 @@
+#!/bin/sh
+
+SRC_DIR="/mnt/fhnwdata/HSI/E2411_Unterrichte_Bachelor/E2411_Unterrichte_I/4Ia/prcpp/"
+TARGET_DIR="$HOME/dox/fh/prcpp/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"