From 4eab67e4d95d79ebbb699aa713dcd205c25afa02 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonah=20Br=C3=BCchert?= <jbb@kaidan.im>
Date: Thu, 22 Dec 2022 15:44:46 +0100
Subject: [PATCH] Add fixtimes utility

The directories in the whiteboard export have invalid modification
timestamps, this script "fixes" them, by setting them to the current
time.
---
 fufixtimes.sh | 8 ++++++++
 install.sh    | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)
 create mode 100755 fufixtimes.sh

diff --git a/fufixtimes.sh b/fufixtimes.sh
new file mode 100755
index 0000000..06fb131
--- /dev/null
+++ b/fufixtimes.sh
@@ -0,0 +1,8 @@
+#! /bin/sh
+
+if [ ! -f 'grades.csv' ]; then
+    printf "Execute within the directory containing 'grades.csv'\n" >&2
+    exit 1
+fi
+
+find . -exec touch {} \;
diff --git a/install.sh b/install.sh
index 8642ca1..2b6c8af 100755
--- a/install.sh
+++ b/install.sh
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-scripts="fixpdf.sh fucopy.sh fufixpdf.sh fuzip.sh fuxournalexport.sh"
+scripts="fixpdf.sh fucopy.sh fufixpdf.sh fuzip.sh fuxournalexport.sh fixtimes.sh"
 
 destdir="${DESTDIR:=$HOME/.local/bin}"
 mkdir -p "$destdir"
-- 
GitLab