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.

63 lines
2.0 KiB

#!/bin/bash
# DFLinux live-build script
# https://framagit.org/dflinux/DFiso
# cfg ------------------------------------------------------------------
4 years ago
VERSION="10-alpha1"
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 DFLinux i386"
echo "./DFbuild.sh 64 > construire DFLinux 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 DFLinux-${VERSION}-${ARCH}"
# dossier des paquets externes
mkdir -p config/packages
# import des paquets externes
cp ext/*.deb config/packages/
# architecture
if [ "$ARCH" == "i386" ]; then lb config -a ${ARCH} -k "686"; lb build; fi
if [ "$ARCH" == "amd64" ]; then lb config -a ${ARCH}; lb build; fi
# nettoyage
rm -Rf config/packages config/includes config/includes.bootstrap config/includes.source
## renommage
echo "INFO: renommer"
if test -f live-image-${ARCH}.hybrid.iso; then
mkdir -p dfl-${ARCH}
4 years ago
mv live-image-${ARCH}.hybrid.iso dfl-${ARCH}/debian-facile-${VERSION}-${ARCH}.iso
mv chroot.packages.install dfl-${ARCH}/debian-facile-${VERSION}-${ARCH}.pkgs
mv dflinux.log dfl-${ARCH}/debian-facile-${VERSION}-${ARCH}.log
cd dfl-${ARCH} && md5sum debian-facile-${VERSION}-${ARCH}.iso > debian-facile-${VERSION}-${ARCH}.md5 && cd ../
lb clean
else
echo "ISO non construite : erreur, voir le fichier dflinux.log"
exit 1
fi
exit 0