diff --git a/src/not flake/split-gallery-videos.sh b/src/not flake/split-gallery-videos.sh index a753275..4e5b237 100755 --- a/src/not flake/split-gallery-videos.sh +++ b/src/not flake/split-gallery-videos.sh @@ -1,4 +1,5 @@ -#! /etc/profiles/per-user/jawz/bin/bash +#! /usr/bin/env nix-shell +#! nix-shell -i bash -p bash # Source and destination directories SRC_DIR="/srv/server/pool/scrapping/JawZ/gallery-dl" @@ -9,14 +10,11 @@ mkdir -p "$DEST_DIR" # Find all the desired files and process them find "$SRC_DIR" -type f \( -name "*.mp4" -o -name "*.webm" -o -name "*.sfw" -o -name "*.m4v" -o -name "*.wav" -o -name "*.m4a" -o -name "*.ytdl" -o -name "*.mkv" \) | while read -r FILE; do - # Get the relative path REL_PATH="${FILE#"$SRC_DIR"/}" - # Create the destination directory structure DEST_PATH="$DEST_DIR/$(dirname "$REL_PATH")" mkdir -p "$DEST_PATH" - # Move the file mv "$FILE" "$DEST_PATH/" done