57 lines
1.4 KiB
Bash
Executable File
57 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ "$EUID" = 0 ]
|
|
then echo "Please don't run this as root"
|
|
exit
|
|
fi
|
|
|
|
# 2> /dev/null veut dire que l'on veut pas voire les erreurs
|
|
sudo umount rootfs/proc -R 2> /dev/null
|
|
sudo rm -rf rootfs/ 2> /dev/null
|
|
sudo rm root.iso 2> /dev/null
|
|
sudo rm chibrax.tar.gz 2> /dev/null
|
|
mkdir -p rootfs/
|
|
mkdir -p rootfs/boot
|
|
mkdir -p rootfs/chibrax
|
|
|
|
#installation de grub
|
|
# coreutils = cat
|
|
sudo pacstrap rootfs device-mapper || exit 1
|
|
|
|
echo "construction de liblzma"
|
|
chmod +x ./liblzma/build.sh
|
|
cd liblzma && ./build.sh || exit 1 && cd -
|
|
echo "done"
|
|
|
|
echo "construction de grub"
|
|
chmod +x ./grub/build.sh
|
|
cd grub && ./build.sh || exit 1 && cd -
|
|
echo "done"
|
|
|
|
echo "construction de Nodejs"
|
|
chmod +x ./nodejs/build.sh
|
|
cd nodejs && ./build.sh || exit 1 && cd -
|
|
echo "done"
|
|
|
|
chmod +x ./chibraxLoader/build.sh
|
|
cd chibraxLoader && ./build.sh && cd -
|
|
sudo cp chibraxLoader/init rootfs/bin/ || exit 1
|
|
|
|
cd kernel && ./from_current.sh && cd -
|
|
sudo cp kernel/src/vmlinuz rootfs/boot || exit 1
|
|
|
|
echo "Cloning the firmware"
|
|
# on masque les erreurs si le depot est deja clone
|
|
git clone https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git 2> /dev/null
|
|
cd linux-firmware && git pull && cd -
|
|
sudo mkdir -p rootfs/usr/lib/firmware || exit 1
|
|
sudo cp linux-firmware/* rootfs/usr/lib/firmware/ -r || exit 1
|
|
echo "done"
|
|
|
|
echo "rebuilding C++ hooks"
|
|
./clibs.sh || exit 1
|
|
echo "done"
|
|
|
|
sudo cp rootfs\ overrides/* rootfs/ -r || exit 1
|
|
|
|
sudo rm rootfs/var/cache -r |