-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRUNME.bash
executable file
·27 lines (22 loc) · 1.18 KB
/
RUNME.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
echo "******************************************************"
echo "* *"
echo "* Choose Your Own Adventuresque *"
echo "* *"
echo "* Toby Harris *"
echo "* http://sparklive.net *"
echo "* *"
echo "******************************************************"
cd "$( dirname "$BASH_SOURCE" )"
# TASK: Serve the local directory
# Using Python built-in server. Must background, so script can continue to open Chrome
python3 -m http.server &
# TASK: Open Chrome in kiosk mode
# First quit any existing Chrome instances...
killall Google\ Chrome
# ...so a new instance will respect the kiosk flag
# Need autoplay-policy for video to play without user interaction
# For all command-line flags, see https://peter.sh/experiments/chromium-command-line-switches/
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --kiosk --autoplay-policy=no-user-gesture-required http://0.0.0.0:8000/
# TASK: Quit any backgrounded processes
trap 'kill $(jobs -p)' EXIT