#!/bin/sh

## (c) 2014 Frédéric Gaudet. Based on :
## live-config(7) - System Configuration Scripts
## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org>
##
## Copyright (C) 2017 Paweł Pijanowski <pavroo@onet.eu>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
## under certain conditions; see COPYING for details.

Installer_Guide_icon ()
{
    if [ -e /usr/share/applications/sparky-installation-guide.desktop ]; then
        if [ ! -e /home/${LIVE_USERNAME}/Desktop ]; then
            mkdir -p /home/${LIVE_USERNAME}/Desktop                
        fi
        cp /usr/share/applications/sparky-installation-guide.desktop /home/${LIVE_USERNAME}/Desktop/sparky-installation-guide.desktop
        chmod 755 /home/${LIVE_USERNAME}/Desktop/sparky-installation-guide.desktop
        chown ${LIVE_USERNAME}:${LIVE_USERNAME} "/home/${LIVE_USERNAME}/Desktop" -R        
    fi
    
    # Creating state file
    touch /var/lib/live/config/sparky-installation-guide-icon
}

Installer_Guide_icon
