#!/bin/sh

if [ "$(id -u)" -ne 0 ]; then
	echo 'oem-config must be run with sudo.' >&2
	exit 1
fi

optimize='OO'; case "$*" in *--debug*) unset optimize; esac

# Slideshow is broken in virtualbox without this.
export WEBKIT_DISABLE_COMPOSITING_MODE=1

export GDK_SCALE=`/usr/lib/live-installer/set-hidpi.py`
python3 -tt${optimize} //usr/lib/live-installer/main.py --oem-config
