#!/usr/bin/env bash
set -e

if [ "$(id -u)" -eq 0 ]; then
    echo "Error: do not run this script with sudo. Run it as your normal user."
    echo "  epc670-enable-gui-autostart"
    exit 1
fi

mkdir -p "$HOME/.config/autostart"
cp /usr/share/applications/TOFcam-670.desktop "$HOME/.config/autostart/"
echo "GUI autostart enabled."
