From c14aabfd17c85632bd68db60867edb3fb662c7e7 Mon Sep 17 00:00:00 2001 From: Johannes Herman Date: Thu, 11 Dec 2025 06:49:19 +0100 Subject: initial commit --- bin/copy_videos.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 bin/copy_videos.sh (limited to 'bin/copy_videos.sh') diff --git a/bin/copy_videos.sh b/bin/copy_videos.sh new file mode 100755 index 0000000..d8d1fe6 --- /dev/null +++ b/bin/copy_videos.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +SOURCE_DIR="videos" +DEST_DIR="public/videos" + +mkdir -p "$DEST_DIR" + +for video in "$SOURCE_DIR"/*; do + [ -f "$video" ] || continue + + filename=$(basename -- "$video") + dest="$DEST_DIR/$filename" + + [ -f "$dest" ] && continue + + echo " copying video: $filename" + + cp "$video" "$dest" +done + -- cgit v1.2.3