summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/random.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/scripts/random.sh b/scripts/random.sh
new file mode 100755
index 0000000..446a4a4
--- /dev/null
+++ b/scripts/random.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+#cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
+
+WALLPAPERS_PATH=workshop_wallpapers_11-8-21
+BUILD_DIR=build-release
+
+export mesa_glthread=true
+
+if [[ $1 == "audio" ]]
+then
+ while : ; do
+ DIR=$(find $WALLPAPERS_PATH -maxdepth 1 -type d | shuf -n 1)
+ RES=$(cat $DIR/project.json | jq '.["general"]["supportsaudioprocessing"]')
+ [[ "$RES" == 'null' || "$RES" == 'false' ]] || break
+ done
+elif [[ $1 == "safe" ]]
+then
+ while : ; do
+ DIR=$(find $WALLPAPERS_PATH -maxdepth 1 -type d | shuf -n 1)
+ RES=$(cat $DIR/project.json | jq '.["contentrating"]')
+ [[ "$RES" == 'null' || "$RES" != '"Everyone"' ]] || break
+ done
+else
+ DIR=$(find $WALLPAPERS_PATH -maxdepth 1 -type d | shuf -n 1)
+fi
+
+echo $DIR
+
+cd $BUILD_DIR
+./mauri ../$DIR/scene.pkg
+cd ..