#!/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>
##
## 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_icon ()
{
    if [ -e /usr/share/applications/live-installer.desktop ]; then
        if [ ! -e /home/${LIVE_USERNAME}/Desktop ]; then
            mkdir -p /home/${LIVE_USERNAME}/Desktop                
        fi
        cp /usr/share/applications/live-installer.desktop /home/${LIVE_USERNAME}/Desktop/live-installer.desktop
        chmod 755 /home/${LIVE_USERNAME}/Desktop/live-installer.desktop
        chown ${LIVE_USERNAME}:${LIVE_USERNAME} "/home/${LIVE_USERNAME}/Desktop" -R        
    fi
    
    # Creating state file
    touch /var/lib/live/config/installer-icon
}

Installer_icon