Added stage4 extraction

This commit is contained in:
Eric Renfro 2024-08-04 19:46:10 -04:00
parent 9a1ea05dcb
commit d5bcff89bf
Signed by: psi-jack
SSH key fingerprint: SHA256:1TKB8Z257L8EHK8GWNxKgMhD8a+FAR+f+j3nnlcuNVM

View file

@ -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: