summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/line_count.sh2
-rwxr-xr-xscripts/random.sh26
2 files changed, 28 insertions, 0 deletions
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 ..