Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the downloader default GUI #66

Merged
merged 2 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions __frzr
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ frzr_status() {
"Local Install": "$LOCAL_INSTALL",
"Repair Install": "$REPAIR_INSTALL",
"Show UI": "$SHOW_UI",
"GUI Installer": "$FRZR_INSTALLER",
"EFI Path": "$EFI_MOUNT_PATH",
"Mount Path": "$MOUNT_PATH",
"SUBVOL": "$SUBVOL",
Expand Down
10 changes: 6 additions & 4 deletions __frzr-deploy
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ frzr_deploy() {
if [ $FRZR_STEAM_PROGRESS -eq 1 ]; then
curl --http1.1 -# -L -o "${IMG_FILE}" -C - "${IMG_URL}" 2>&1 |
stdbuf -oL tr '\r' '\n' | grep --line-buffered -oP '[0-9]*+(?=.[0-9])' | clean_progress 91 %
elif [ -z ${SHOW_UI} ]; then
elif [ "${SHOW_UI}" = "0" ] && [ "${FRZR_INSTALLER}" = "1" ]; then
# This will need to be put under a new variable if it passes testing because we want to have different
# logic depending if there is a Modern UI, legecy UI support, or if it is ran via CLI
TASK_MSG="Downloading Image"
Expand All @@ -354,6 +354,8 @@ frzr_deploy() {
fi;
sleep 1;
done
elif [ "${SHOW_UI}" = "0" ]; then
curl --http1.1 -L -o "${IMG_FILE}" -C - "${IMG_URL}"
else
TASK_MSG="Using Whiptail to show download progress"
send_data
Expand Down Expand Up @@ -412,7 +414,7 @@ frzr_deploy() {
fi

# Use BTRFS receive to install the image
if [ -z ${SHOW_UI} ]; then
if [ "${SHOW_UI}" = "0" ]; then
TASK_MSG="Installing image ${NAME}"
send_data
else
Expand Down Expand Up @@ -572,7 +574,7 @@ frzr_deploy() {

RUNNING=false

if [ -z ${SHOW_UI} ]; then
if [ "${SHOW_UI}" = "0" ]; then
echo "Deployment is successful: reboot to boot into ${NAME}"
else
whiptail --msgbox "Deployment is successful: reboot to boot into ${NAME}" 8 48
Expand All @@ -585,7 +587,7 @@ frzr_deploy() {
send_data
RUNNING=false

if [ -z ${SHOW_UI} ]; then
if [ "${SHOW_UI}" = "0" ]; then
echo "Deployment failed: ${TASK_ERROR_MSG}"
else
whiptail --msgbox "Deployment failed: ${TASK_ERROR_MSG}" 8 48
Expand Down
4 changes: 4 additions & 0 deletions __frzr-envars
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ if [ -z "$EFI_MOUNT_PATH" ]; then
EFI_MOUNT_PATH="${MOUNT_PATH}/efi" # EFI mount path
fi

if [ -z "$FRZR_INSTALLER" ]; then
FRZR_INSTALLER="0"
fi

SUBVOL=""
DEPLOY_PATH="" # ${MOUNT_PATH}/deployments
FRZR_CHECK_UPDATE=0
Expand Down
1 change: 1 addition & 0 deletions test/test-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ if btrfs send $MOUNT_POINT/archlinux | xz -e -9 --memory=95% -T0 > $TARGET_FILEN
export SWAP_GIB=0
bash /workdir/frzr bootstrap

export SHOW_UI="0"
export SKIP_UEFI_CHECK="yes"
export MOUNT_PATH="/tmp/frzr_root"
export EFI_MOUNT_PATH="/tmp/frzr_root/efi"
Expand Down
1 change: 1 addition & 0 deletions test/test-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export DISK="$MOUNTED_DEVICE"
export SWAP_GIB=0
bash /workdir/frzr bootstrap

export SHOW_UI="0"
export SKIP_UEFI_CHECK="yes"
export MOUNT_PATH="/tmp/frzr_root"
export EFI_MOUNT_PATH="/tmp/frzr_root/efi"
Expand Down
1 change: 1 addition & 0 deletions test/test-removal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export DISK="$MOUNTED_DEVICE"
export SWAP_GIB=0
bash /workdir/frzr bootstrap

export SHOW_UI="0"
export SKIP_UEFI_CHECK="yes"
export MOUNT_PATH="/tmp/frzr_root"
export EFI_MOUNT_PATH="/tmp/frzr_root/efi"
Expand Down
Loading