From f0f55de1bd104e9fd4fce432c35be5cd73f0315a Mon Sep 17 00:00:00 2001 From: Rendo Date: Sun, 12 Apr 2026 22:45:40 +0500 Subject: [PATCH] Space handling --- shuffle.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/shuffle.sh b/shuffle.sh index 52054aa..382e636 100755 --- a/shuffle.sh +++ b/shuffle.sh @@ -1,13 +1,13 @@ #!/bin/bash -SOURCE_DIR=$(dirname -- "${BASH_SOURCE[0]}") +SOURCE_DIR="$(dirname -- "${BASH_SOURCE[0]}")" -EXTRACTION_DIR=$SOURCE_DIR/selection/ -SFW_DIR=$SOURCE_DIR/alternative/ +EXTRACTION_DIR="$SOURCE_DIR/selection/" +SFW_DIR="$SOURCE_DIR/alternative/" -EXTRACTED_FILE=$(find -L $SOURCE_DIR/selection/ -type f | shuf -n 1) +EXTRACTED_FILE="$(find -L $SOURCE_DIR/selection/ -type f | shuf -n 1)" magick $EXTRACTED_FILE $SOURCE_DIR/selected.jpg if [ "$OVERRIDE_SFW" = "1" ]; then - magick $(find -L $SFW_DIR -type f | shuf -n 1) $SOURCE_DIR/selected.jpg + magick "$(find -L $SFW_DIR -type f | shuf -n 1)" $SOURCE_DIR/selected.jpg fi