Initial commit
This commit is contained in:
commit
a5a532b918
3 changed files with 22 additions and 0 deletions
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
selected.jpg
|
||||
selection
|
||||
sfw
|
||||
6
no-no.sh
Executable file
6
no-no.sh
Executable file
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
SOURCE_DIR=$(dirname -- "${BASH_SOURCE[0]}")
|
||||
|
||||
OVERRIDE_SFW=1 $SOURCE_DIR/shuffle.sh
|
||||
kitty
|
||||
13
shuffle.sh
Executable file
13
shuffle.sh
Executable file
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
SOURCE_DIR=$(dirname -- "${BASH_SOURCE[0]}")
|
||||
|
||||
EXTRACTION_DIR=$SOURCE_DIR/selection/
|
||||
SFW_DIR=$SOURCE_DIR/sfw/
|
||||
|
||||
EXTRACTED_FILE=$EXTRACTION_DIR$(ls $SOURCE_DIR/selection/ | shuf -n 1 -)
|
||||
|
||||
magick $EXTRACTED_FILE $SOURCE_DIR/selected.jpg
|
||||
|
||||
if [ "$OVERRIDE_SFW" = "1" ]; then
|
||||
cp $SFW_DIR$(ls $SFW_DIR | shuf -n 1 -) $SOURCE_DIR/selected.jpg
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue