13 lines
360 B
Bash
Executable file
13 lines
360 B
Bash
Executable file
#!/bin/bash
|
|
SOURCE_DIR=$(dirname -- "${BASH_SOURCE[0]}")
|
|
|
|
EXTRACTION_DIR=$SOURCE_DIR/selection/
|
|
SFW_DIR=$SOURCE_DIR/alternative/
|
|
|
|
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
|
|
fi
|