summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2021-11-11 18:54:53 +0100
committerErich Eckner <git@eckner.net>2021-11-11 18:54:53 +0100
commitc277109cfa15f4fb65636d883c0a06792b5f5da0 (patch)
tree1a96e56dc846ff3578bc0f7b6b98fee5d71df94d /common
parentc1140e40b003d6ed6ffa7ca5d4cb699d5c8dfec6 (diff)
downloadcarddav-alpine-converter-c277109cfa15f4fb65636d883c0a06792b5f5da0.tar.xz
carddav-to-alpine könnte schon gehen
Diffstat (limited to 'common')
-rw-r--r--common15
1 files changed, 15 insertions, 0 deletions
diff --git a/common b/common
new file mode 100644
index 0000000..3204673
--- /dev/null
+++ b/common
@@ -0,0 +1,15 @@
+#!/hint/bash
+
+gen_rev() {
+ printf 'REV:%s\n' "$(
+ date -u -Iseconds \
+ | sed 's@+00:00$@Z@'
+ )"
+}
+
+git_dir="$1"
+
+if [ ! -d "${git_dir}" ]; then
+ >&2 printf 'invalid git dir: "%s"\n' "${git_dir}"
+ exit 1
+fi