#!/bin/sh
export TEXTDOMAIN=slint-scripts
if [ "$(id -u)" = "0" ]; then
    gettext "Please run this script as regular user."; echo
    exit
fi
if [ ! -f $PKG/usr/share/onboard/startonboard.desktop ]; then
	gettext "You need to install onboard first."; echo
	exit
fi
if [ ! -f ~/.config/autostart/startonboard.desktop ]; then
	mkdir -p ~/.config/autostart
	cp $PKG/usr/share/onboard/startonboard.desktop ~/.config/autostart
	chown -R $(id -un): ~/.config/autostart
fi
(cd ~/.config/autostart/ || exit 1
sed -i "s/Hidden.*/Hidden=false/" startonboard.desktop
)
gettext "onboard has been enabled."; echo
gettext "To disable it type onboard-off"; echo
