From f452ab3573029c818345bc8ce342239cf10bde04 Mon Sep 17 00:00:00 2001 From: kevadesu Date: Fri, 25 Oct 2024 22:00:00 +0200 Subject: [PATCH] i didnt do much except add a bit, none of the code is functional so far though because this shit is still incomplete --- Einrichter-as-LFS.sh | 20 +++++++++++++------- README.md | 2 +- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Einrichter-as-LFS.sh b/Einrichter-as-LFS.sh index 83a830c..40c86d9 100644 --- a/Einrichter-as-LFS.sh +++ b/Einrichter-as-LFS.sh @@ -1,17 +1,19 @@ #!/bin/bash main() { - eal.envsetup + eal.setup.env + eal.setup.toolchain } -function eal.envsetup() { +function eal.setup.env() { echo "The installer is about to begin setting up the environment. Please wait..." sleep 2 -cat > ~/.bash_profile << "EOF" + + cat > ~/.bash_profile << "EOF" exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash EOF -cat > ~/.bashrc << "EOF" + cat > ~/.bashrc << "EOF" set +h umask 022 LFS=/mnt/lfs @@ -22,13 +24,17 @@ if [ ! -L /bin ]; then PATH=/bin:$PATH; fi PATH=$LFS/tools/bin:$PATH CONFIG_SITE=$LFS/usr/share/config.site export LFS LC_ALL LFS_TGT PATH CONFIG_SITE -EOF - -cat >> ~/.bashrc << "EOF" export MAKEFLAGS=-j$(nproc) +export SYS_TRIPLET=/usr/bin/gcc -dumpmachine EOF source ~/.bash_profile } +eal.setup.toolchain() { + echo -e "I: The detected system triplet is $(/usr/bin/gcc -dumpmachine)." + export SYS_TRIPLET=$(/usr/bin/gcc -dumpmachine) + echo +} + main \ No newline at end of file diff --git a/README.md b/README.md index ff71671..79f3d44 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ LFS v12.2-systemd book chapter: 4.2. ## To do ```md [ ] Make a package manager -[X] Finish the project in the first place +[ ] Finish the project in the first place ``` ## Contributing