Add script for creating archive

This commit is contained in:
Simon Bruder 2023-05-18 09:28:41 +02:00
parent e64cbfdcf2
commit 8d4cf138e1

11
archive.sh Executable file
View file

@ -0,0 +1,11 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: GPL-3.0-or-later
set -euo pipefail
dir="$1"
if [ ! -d "$dir" ]; then
echo "first argument must be a directory, e.g. u02" >&2
exit 1
fi
out="/tmp/ecg-${dir}-simon-bruder.zip"
git archive --format=zip master "$dir" -o "$out"
echo "$out"