From acd44bb898996ff4e36b39b10e870e40bcaf2634 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Fri, 10 Nov 2023 19:24:56 -0500 Subject: One last push Signed-off-by: Andrew Opalach --- scripts/line_count.sh | 2 ++ scripts/random.sh | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100755 scripts/line_count.sh create mode 100755 scripts/random.sh (limited to 'scripts') diff --git a/scripts/line_count.sh b/scripts/line_count.sh new file mode 100755 index 0000000..2ecb7f5 --- /dev/null +++ b/scripts/line_count.sh @@ -0,0 +1,2 @@ +#! /usr/bin/env sh +find ./src -type f | xargs wc -l diff --git a/scripts/random.sh b/scripts/random.sh new file mode 100755 index 0000000..00689a8 --- /dev/null +++ b/scripts/random.sh @@ -0,0 +1,26 @@ +#! /usr/bin/env bash + +BUILD_DIR=build-nix-release +WALLPAPERS_PATH=workshop_wallpapers_11-8-21 +#WALLPAPERS_PATH=workshop_wallpapers + +while : ; do +DIR=$(find $WALLPAPERS_PATH -mindepth 1 -maxdepth 1 -type d -print0 | shuf -zn1 | xargs --null) +if [[ $1 == "audio" ]] +then + RES=$(cat $DIR/project.json | jq '.["general"]["supportsaudioprocessing"]') + [[ ! -f $DIR/scene.pkg || "$RES" == 'null' || "$RES" == 'false' ]] || break +elif [[ $1 == "safe" ]] +then + RES=$(cat $DIR/project.json | jq '.["contentrating"]') + [[ ! -f $DIR/scene.pkg || "$RES" == 'null' || "$RES" != '"Everyone"' ]] || break +else + [[ ! -f $DIR/scene.pkg ]] || break +fi +done + +echo $DIR + +cd $BUILD_DIR +./mauri -p ../$DIR/scene.pkg -w 1600 -h 900 +cd .. -- cgit v1.2.3-101-g0448