#!/bin/bash echo "\nScript de préparation Live Build\n" mkdir -pv auto for file in "../auto/config ../auto/build ../auto/clean" do cp -vr $file auto/ done echo "\nLancer la commande lb clean ? Si oui, avec une option ? (O/N/option)" read rep0 if [ $rep0 = 'N' ] then echo "Pas de nettoyage" elif [ $rep0 = 'O' ] then echo "Exécution de sudo lb build" sudo lb clean else echo "Exécution de sudo lb build --$rep0" sudo lb clean --$rep0 fi editor auto/config echo "\nExécution de lb config" lb config echo "\nUtiliser un fichier .list.chroot ? (O/N)" read rep1 if [ $rep1 = 'O' ] then cp -v ../auto/live.list.chroot config/package-lists/live.list.chroot editor config/package-lists/live.list.chroot fi echo "\nUtiliser un fichier .hook.chroot ? (O/N)" read rep2 if [ $rep2 = 'O' ] then cp -v ../auto/1000-perso.hook.chroot config/hooks/ editor config/hooks/1000-perso.hook.chroot fi echo "\nRemplir /etc/skel ? (O/N)" read rep3 if [ $rep3 = 'O' ] then cp -v ../auto/includes.etc.skel.txt auto/ editor auto/includes.etc.skel.txt for dir in `ls /home/$USER` do mkdir -pv config/includes.chroot/etc/skel/$dir done for file in `cat ../auto/includes.etc.skel.txt` do cp -vpR /home/$USER/$file config/includes.chroot/etc/skel/ done fi echo "\nRemplir /root ? (O/N)" read rep3 if [ $rep3 = 'O' ] then cp -v ../auto/includes.root.txt auto/ editor auto/includes.root.txt mkdir -v config/includes.chroot/root for file in `cat ../auto/includes.root.txt` do sudo cp -vpR $file config/includes.chroot/root/ done fi echo "\nNom de l'iso ?" read nom ex config/build -c 9s/live-image/$nom -c visual sh ../auto/backup_auto.sh