diff options
Diffstat (limited to 'bin/copy_videos.sh')
| -rwxr-xr-x | bin/copy_videos.sh | 20 |
1 files changed, 20 insertions, 0 deletions
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 + |
