diff --git a/create.sh b/create.sh index df6f484..912b4d1 100755 --- a/create.sh +++ b/create.sh @@ -5,20 +5,20 @@ source creator_functions.sh mkdir -p build cd build -echo_blue "Starting installation at $ROOT." +echo_cyan "Starting installation at $ROOT." create_dirs -echo_blue "Adding binaries and libs..." +echo_cyan "Installing binaries and libs..." install_binary $(which switch_root) install_binary $(which bash) install_binary $(which mount) install_kmod install_busybox -echo_blue "Adding scripts..." +echo_cyan "Installing scripts..." install_init_script -echo_blue "Adding kernel modules..." +echo_cyan "Installing kernel modules..." install_module "$(df -T / | awk '{ print $2 }' | tail -1)" install_module btrfs install_module msr @@ -27,5 +27,4 @@ install_module dm_crypt cp /lib/modules/${KERNEL}/modules.{order,builtin,builtin.modinfo} "${ROOT}/lib/modules/${KERNEL}/" depmod -b "$ROOT" "$KERNEL" -echo_blue "Creating archive..." create_archive diff --git a/creator_functions.sh b/creator_functions.sh index 7e692be..4a1a1a1 100644 --- a/creator_functions.sh +++ b/creator_functions.sh @@ -1,7 +1,11 @@ #!/bin/bash +echo_cyan() { + echo -e "\033[0;36m$1\033[0m" +} + echo_blue() { - echo -e "\033[34m$1\033[0m" + echo -e "\033[0;34m$1\033[0m" } echo_yellow() { @@ -64,7 +68,7 @@ install_binary() { } install_kmod() { - echo_blue "Installing kmod (depmod, insmod, lsmod, modinfo, modprobe, rmmod)..." + echo_cyan "Installing kmod (depmod, insmod, lsmod, modinfo, modprobe, rmmod)..." install_binary /usr/bin/kmod || return 1 ln -s kmod ${ROOT}/usr/bin/lsmod ln -s kmod ${ROOT}/usr/bin/rmmod @@ -75,7 +79,7 @@ install_kmod() { } install_busybox() { - echo_blue "Installing busybox..." + echo_cyan "Installing busybox..." [[ -f "$BUSYBOX_PATH" ]] || { echo_red "Did not find busybox at $BUSYBOX_PATH" echo_red "Please compile or download busybox. You can also change the path." @@ -124,7 +128,7 @@ _install_module() { create_archive() { local archive="detee-$(hostnamectl hostname)-${KERNEL}.cpio.gz" - echo_blue "Creating archive $archive" + echo_cyan "Creating archive $archive" echo $archive > .archive_name my_location="$(pwd)" cd ${ROOT}