#!/bin/bash

umount debian_livecd/proc --force --lazy &&
umount debian_livecd/sys --force --lazy &&
umount debian_livecd/dev/pts --force --lazy &&
umount debian_livecd/run --force --lazy &&
umount debian_livecd/dev --force --lazy &&
cp -r new_skel/* debian_livecd/root/ &&
cp -r new_skel/* debian_livecd/etc/skel/ &&
cp -r new_skel/.* debian_livecd/root/ &&
cp -r new_skel/.* debian_livecd/etc/skel/ &&
cp -r calamares/* debian_livecd/etc/calamares/ &&
cp calamares-sources-final debian_livecd/usr/share/calamares/helpers/calamares-sources-final &&
cp calamares-install-debian.desktop debian_livecd/usr/share/applications/calamares-install-debian.desktop &&
cp new_skel/Desktop/Set\ Up\ Network\ Folder\ Sharing.desktop debian_livecd/usr/share/applications/Set\ Up\ Network\ Folder\ Sharing.desktop &&
cp sudoers debian_livecd/etc/sudoers &&
chmod 440 debian_livecd/etc/sudoers &&
mksquashfs debian_livecd filesystem.squashfs -comp xz &&
mv filesystem.squashfs liveshell/live/
