L'ISO Debian-Facile est un projet visant à faire découvrir l'univers GNU/Linux aux très grands débutants.
https://debian-facile.org/projets:iso-debian-facile
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
139 lines
4.6 KiB
139 lines
4.6 KiB
#!/bin/bash |
|
# Debian-Facile live-build script |
|
# https://debian-facile.org/git/ProjetsDF/dfiso-buster/ |
|
|
|
# cfg ------------------------------------------------------------------ |
|
VERSION="10.6-1" |
|
|
|
if [ `whoami` != root ]; then |
|
echo "erreur : lancer DFbuild en tant qu'administrateur" |
|
exit 1 |
|
fi |
|
# args ----------------------------------------------------------------- |
|
if [ "$1" == "32" ]; then ARCH="i386" |
|
elif [ "$1" == "64" ]; then ARCH="amd64" |
|
elif [ "$1" == "clean" ]; then lb clean && rm -R -f cache && exit 0 |
|
else |
|
# no args or wrong args > help |
|
echo "Utilisation : en mode administrateur" |
|
echo "./DFbuild.sh 32 > construire DFiso i386" |
|
echo "./DFbuild.sh 64 > construire DFiso amd64" |
|
echo "./DFbuild.sh clean > nettoyer le dossier de construction et le cache" |
|
echo "---" |
|
echo "prenez soin de nettoyer le cache avant de construire sous une nouvelle architecture." |
|
exit 1 |
|
fi |
|
|
|
## build ISO ----------------------------------------------------------- |
|
|
|
## place nette |
|
lb clean |
|
|
|
## mise en place |
|
echo "INFO: building DFiso-${VERSION}-${ARCH}" |
|
|
|
## mise en place du dossier des paquets externes |
|
mkdir -p config/packages |
|
|
|
## construction des paquets debian |
|
mkdir -p src-deb |
|
cd src-deb/ |
|
# gdebi-fixdesk |
|
echo "" |
|
echo "INFOS : construction du gdebi-fixdesk.deb" |
|
git clone --branch master --depth 1 https://debian-facile.org/git/ProjetsDF/gdebi-fixdesk.git |
|
cd gdebi-fixdesk/ |
|
equivs-build gdebi-fixdesk.equivs |
|
mv *.deb ../../config/packages/ |
|
cd ../ |
|
# dfl-dispatch |
|
echo "" |
|
echo "INFOS : construction du dfl-dispatch.deb" |
|
git clone --branch master --depth 1 https://debian-facile.org/git/ProjetsDF/dfl-dispatch.git |
|
cd dfl-dispatch/ |
|
equivs-build dfl-dispatch.equivs |
|
mv *.deb ../../config/packages/ |
|
cd ../ |
|
# handymenu |
|
echo "" |
|
echo "INFOS : construction du handymenu.deb" |
|
git clone --branch master --depth 1 https://debian-facile.org/git/ProjetsDF/handymenu.git |
|
cd handymenu/ |
|
equivs-build handymenu.equivs |
|
mv *.deb ../../config/packages/ |
|
cd ../ |
|
# df-manuel |
|
echo "" |
|
echo "INFOS : récupération des sources pour doc-dfiso-buster" |
|
git clone --branch master --depth 1 https://debian-facile.org/git/ProjetsDF/doc-dfiso-buster.git |
|
cd doc-dfiso-buster/docs/ |
|
./mkpdf |
|
cd ../debian/ |
|
./mkdeb |
|
cd ../ |
|
mv *.deb ../../config/packages/ |
|
cd ../../ |
|
echo "" |
|
echo "INFOS : nettoyage du dossier de construction des deb's" |
|
rm -Rf src-deb/ |
|
# import des cahiers du débutant |
|
# pensez à vérifier la version sur le serveur pour ajuster la commande |
|
echo "" |
|
echo "INFOS : récupération des cahiers du débutant" |
|
cd config/packages/ |
|
wget -q -c https://debian-facile.org/projets/lescahiersdudebutant/download/lescahiersdudebutant_10.5-2_all.deb |
|
cd ../../ |
|
|
|
## téléchargement des vidéos de présentation et d'installation |
|
## depuis le compte peertube debian-facile |
|
## section à commenter pendant les tests en local |
|
# récupération de la vidéo d'installation |
|
wget -c https://video.tedomum.net/download/videos/872b23f7-aa20-4cf4-b076-a5be2d1ba6b0-718.mp4 \ |
|
-O config/includes.chroot/etc/skel/Vidéos/DFiso_3_modes_d_installation.mp4 |
|
# récupération de la vidéo de présentation |
|
wget -c https://video.tedomum.net/download/videos/0ed9302a-82bb-482d-a5c1-ef1532385c94-720.mp4 \ |
|
-O config/includes.chroot/etc/skel/Vidéos/Debian_Buster_par_Debian_Facile.mp4 |
|
|
|
CONFIG=() |
|
# utiliser apt-cacher s'il est installé |
|
if dpkg-query -W apt-cacher-ng &>"/dev/null" |
|
then |
|
export http_proxy="http://127.0.0.1:3142/" |
|
CONFIG+=("--apt-http-proxy" "$http_proxy") |
|
else |
|
echo "WARNING: apt-cacher-ng n'est pas installé" |
|
fi |
|
|
|
# architecture handling |
|
CONFIG+=("-a" "${ARCH}") |
|
case $ARCH in |
|
i386)CONFIG+=("-k" "686" "--bootloader" "syslinux");; |
|
amd64)CONFIG+=("--bootloader" "syslinux,grub-efi");; |
|
esac |
|
|
|
# version into USB name |
|
CONFIG+=("--iso-application" "DFiso_$VERSION" "--iso-volume" "DFiso_$VERSION") |
|
|
|
# live-build time |
|
lb config ${CONFIG[@]} |
|
lb build |
|
|
|
## renommage |
|
if test -f live-image-${ARCH}.hybrid.iso; then |
|
echo "INFO: renommer" |
|
mkdir -p dfiso-${ARCH} |
|
mv live-image-${ARCH}.hybrid.iso dfiso-${ARCH}/debian-facile-${VERSION}_${ARCH}.iso |
|
mv chroot.packages.install dfiso-${ARCH}/debian-facile-${VERSION}_${ARCH}.pkgs |
|
mv dfiso.log dfiso-${ARCH}/debian-facile-${VERSION}_${ARCH}.log |
|
cd dfiso-${ARCH} && md5sum debian-facile-${VERSION}_${ARCH}.iso > debian-facile-${VERSION}_${ARCH}.md5 && cd ../ |
|
echo "INFO: nettoyage" |
|
rm config/includes.chroot/etc/skel/Vidéos/Debian_Buster_par_Debian_Facile.mp4 |
|
rm config/includes.chroot/etc/skel/Vidéos/DFiso_3_modes_d_installation.mp4 |
|
lb clean |
|
echo "Opération achevée en $(($SECONDS/60)) minutes" |
|
else |
|
echo "ISO non construite : erreur, voir le fichier dfiso.log" |
|
exit 1 |
|
fi |
|
|
|
exit 0
|
|
|