-
Notifications
You must be signed in to change notification settings - Fork 0
add_distro
XADE edited this page Dec 10, 2023
·
1 revision
for example name of the function is distro
distro () {
here are someways to get a rootfs
for example codeberg.org/zz/strap/src/branch/master/pacstrap.sh is the script
GET codeberg.org/zz/strap/raw/branch/master/pacstrap.sh
sh "${FETCHED}" "${DIR}"
for example link to download rootfs tarball is mirror.domain/downloads/disrto-ver.tar.xz
FGE 1 "mirror.domain/downloads" ">distro${COMP}"
for example link to download iso is mirror.domain/downloads/disrto-ver.iso
FGE 1 "mirror/downloads" ">distro.*iso<"
# fetched files are saved as ${FETCHED}
# mount iso on /tmp of new rootfs
MNT -o loop "${FETCHED}" /tmp/iso
# for example, destination of rootfs image inside iso is /LiveOS/rootfs.img
MNT -o loop "${TMP}iso/LiveOS/rootfs.img" tmp/iso
# copy rootfs to ${DIR}
cp -r "${TMP}iso/." "${DIR}"
PRINT "
<package_manager> <install> ${PKG}
" >| "${CHT}"
}
this function should be defined before the comment
## CHECK REQUIREMENTS and START INSTALLATION
a separate section is created inside of function: CHROOT () {} to install grub, modify that instead of including it inside ${CHT}
check and modify other segments of this script if needed
Now, When prompted for DISTRO ID enter the name of function defined earlier
> DISTRO ID : distro