From 3a95b5fd03c5acad450d8b5b9f2a750ae03a783d Mon Sep 17 00:00:00 2001 From: Danilo Reyes Date: Sat, 14 Dec 2024 18:12:40 -0600 Subject: [PATCH] gallery-video nix shebang --- src/not flake/split-gallery-videos.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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