#!/bin/bash

mount -t proc none /proc &&
mount -t sysfs none /sys &&
mount -t devpts none /dev/pts &&
echo "nameserver 8.8.8.8" > /etc/resolv.conf &&
echo "deb http://deb.debian.org/debian stable main non-free-firmware" > /etc/apt/sources.list &&
echo "deb http://security.debian.org/debian-security stable-security main non-free-firmware" >> /etc/apt/sources.list &&
apt update &&
apt dist-upgrade &&
apt-get install -y lightdm mate-desktop-environment network-manager-applet mate-applet-brisk-menu calamares-settings-debian mate-user-admin gnome-disk-utility libfuse2t64 &&
apt install -y --allow-downgrades ./appmanager-2.2.deb ./caja_1.26.4-1_amd64.deb ./caja-common_1.26.4-1_all.deb &&
apt-mark hold caja caja-common &&
./markmanual.py &&
apt remove debian-reference-common debian-reference-es debian-reference-it fortune-mod fortunes-it librecode3 &&
apt clean &&
apt autoclean &&
mv lightdm.conf /etc/lightdm/lightdm.conf &&
mv default.layout /usr/share/mate-panel/layouts/ &&
mv org.mate.marco.gschema.xml /usr/share/glib-2.0/schemas/ &&
mv smbsetup.sh /usr/bin/ &&
mv TraditionalOGrey /usr/share/themes/ &&
rm /usr/share/glib-2.0/schemas/20_mate-debian.gschema.override &&
cd /usr/share/glib-2.0/schemas/ &&
glib-compile-schemas . &&
cd / &&
rm markmanual.py &&
rm appmanager-2.2.deb &&
rm caja_1.26.4-1_amd64.deb &&
rm caja-common_1.26.4-1_all.deb &&
rm 02_during_chroot.sh &&
echo "ctrl+D to get outta here and do the next step"
