diff --git a/scripts/build.sh b/scripts/build.sh index 460b9c1..590e506 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -13,9 +13,16 @@ printf " - Bootstrap the Glacier package manager\n" sleep 0.2 printf " - Compile Everest Linux v1.0.0-busybox\n" sleep 0.2 +printf "The following settings will be used. If these do not work, alter this script.\n" + sleep 0.2 +printf "/mnt/everest - build directory\n" + sleep 0.2 +printf "everest - build user\n" + sleep 0.2 +printf "/bin/bash - shell for user\n" + sleep 0.2 printf "This script will perform actions that are >>> NOT REVERSIBLE! <<<\n" sleep 0.2 - read -p "Are you sure you want to continue? (y/n) " -n 1 -r echo # (optional) move to a new line if [[ $REPLY =~ ^[Yy]$ ]] @@ -104,40 +111,41 @@ then printf "[ i ] Loading build-settings file...\n" ./build-settings printf "[ i ] Creating build directory...\n" - mkdir $EVEREST_BUILD_DIR + mkdir /mnt/everest # CHANGE THIS IF YOU DO NOT WANT YOUR BUILD DIRECTORY TO BE /mnt/everest + export EVEREST=/mnt/everest printf "[ i ] Ensuring EVEREST variable is correctly set up... (output should be the path to the build directory)\n" echo $EVEREST printf "[ i ] Changing permissions...\n" - chmod 777 ${EVEREST} + chmod 777 /mnt/everest printf "[ i ] Creating sources directory...\n" - mkdir -v ${EVEREST}/sources + mkdir -pv $EVEREST/sources printf "[ i ] Downloading packages...\n" - mkdir -v tempfiles + mkdir -pv tempfiles cd tempfiles - wget http://ftp.gnu.org/gnu/binutils/binutils-2.27.tar.bz2 - wget http://busybox.net/downloads/busybox-1.24.2.tar.bz2 - wget https://github.com/cross-lfs/bootscripts-embedded/archive/master.tar.gz - wget http://gcc.gnu.org/pub/gcc/releases/gcc-6.2.0/gcc-6.2.0.tar.bz2 - wget http://ftp.gnu.org/gnu/gmp/gmp-6.1.1.tar.bz2 - wget http://sethwklein.net/iana-etc-2.30.tar.bz2 - wget http://www.kernel.org/pub/linux/kernel/v4.x/linux-4.9.22.tar.xz - wget http://ftp.gnu.org/gnu/mpc/mpc-1.0.3.tar.gz - wget http://ftp.gnu.org/gnu/mpfr/mpfr-3.1.4.tar.bz2 - wget http://www.musl-libc.org/releases/musl-1.1.16.tar.gz + wget --quiet --show-progress http://ftp.gnu.org/gnu/binutils/binutils-2.27.tar.bz2 + wget --quiet --show-progress http://busybox.net/downloads/busybox-1.24.2.tar.bz2 + wget --quiet --show-progress https://github.com/cross-lfs/bootscripts-embedded/archive/master.tar.gz + wget --quiet --show-progress http://gcc.gnu.org/pub/gcc/releases/gcc-6.2.0/gcc-6.2.0.tar.bz2 + wget --quiet --show-progress http://ftp.gnu.org/gnu/gmp/gmp-6.1.1.tar.bz2 + wget --quiet --show-progress http://sethwklein.net/iana-etc-2.30.tar.bz2 + wget --quiet --show-progress http://www.kernel.org/pub/linux/kernel/v4.x/linux-4.9.22.tar.xz + wget --quiet --show-progress http://ftp.gnu.org/gnu/mpc/mpc-1.0.3.tar.gz + wget --quiet --show-progress http://ftp.gnu.org/gnu/mpfr/mpfr-3.1.4.tar.bz2 + wget --quiet --show-progress http://www.musl-libc.org/releases/musl-1.1.16.tar.gz printf "[ i ] Downloading patches...\n" - wget http://patches.clfs.org/embedded-dev/iana-etc-2.30-update-2.patch + wget --quiet --show-progress http://patches.clfs.org/embedded-dev/iana-etc-2.30-update-2.patch printf "[ i ] Double checking EVEREST variable is correct...\n" echo $EVEREST printf "[ i ] Creating user for build...\n" groupadd everest - useradd -s $EVEREST_BUILD_SHELL -g everest -m -k /dev/null everest + useradd -s /bin/bash -g everest -m -k /dev/null everest printf "[ ? ] Enter a password for the new user:\n" passwd everest printf "[ i ] Giving ownership of build directory to the new user...\n" chown -Rv everest $EVEREST - printf "[ i ] The stage 1 installation has now finished. Please run the command below:\n" - printf "su - everest" - printf "[ i ] Then execute the stage 2 installation script." + printf "[ i ] The stage 1 installation has now finished.\n" + #printf "su - everest" + printf "[ i ] Please execute the stage 2 installation.\n" su - everest - printf "test" + #printf "test" fi