From d5bcff89bf1367322d1e2f6f67e1219655d98b5b Mon Sep 17 00:00:00 2001 From: Eric Renfro Date: Sun, 4 Aug 2024 19:46:10 -0400 Subject: [PATCH] Added stage4 extraction --- gentoo-install.sh | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/gentoo-install.sh b/gentoo-install.sh index 4a25aac..bf13a67 100755 --- a/gentoo-install.sh +++ b/gentoo-install.sh @@ -207,8 +207,8 @@ function prepare_target() { } function stage_step() { - local UUID PART_ENTRY_UUID - local SwapUUID SwapOffset + local s4file SwapUUID SwapOffset + local cmd show_options @@ -219,14 +219,24 @@ function stage_step() { exit 1 fi - if [[ "$DEBUG" ]]; then - local cmd="echo" + if "$DEBUG"; then + cmd="echo" else - local cmd="" + cmd="" fi #FIXME check $INSTALL_STAGE for http or local file - # + if [[ "$INSTALL_STAGE" == http* ]]; then + s4file="${INSTALL_STAGE##*/}" + ${cmd} curl -O "/mnt/gentoo/${s4file}" "$INSTALL_STAGE" + s4file="/mnt/gentoo/${INSTALL_STAGE##*/}" + else + s4file="${INSTALL_STAGE}" + fi + + ${cmd} git clone "https://github.com/erenfro/gen2stage4" "$HOME/gen2stage4" + ${cmd} "$HOME/gen2stage4/gen2stage4" -q -t /mnt/gentoo "$s4file" + ${cmd} rm -rf "$HOME/gen2stage4" #FIXME post stage extraction: