#!/bin/sh

# Chromium launcher wrapper script
# Reads optional user/system flags from /etc/chromium/chromium.conf

# System-wide config
if [ -f /etc/chromium/chromium.conf ]; then
	. /etc/chromium/chromium.conf
fi

# Include chromium lib dir in library path for soname shims (e.g. libFLAC.so.14)
export LD_LIBRARY_PATH="/usr/lib/chromium${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"

exec /usr/lib/chromium/chrome \
	--enable-features=UseOzonePlatform \
	${CHROMIUM_FLAGS:-} \
	${CHROMIUM_USER_FLAGS:-} \
	"$@"
