Space handling
This commit is contained in:
parent
eafaedeb4d
commit
f0f55de1bd
1 changed files with 5 additions and 5 deletions
10
shuffle.sh
10
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue