Files
CISS.debian.installer/.archive/func/0000_performing_branch_confirmation.sh
Marc S. Weidner e8d85a39ae
All checks were successful
🛡️ Retrieve DNSSEC status of coresecret.dev. / 🛡️ Retrieve DNSSEC status of coresecret.dev. (push) Successful in 34s
🔁 Render Graphviz Diagrams. / 🔁 Render Graphviz Diagrams. (push) Successful in 24s
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m35s
V8.00.000.2025.06.17
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
2025-06-25 10:10:41 +02:00

82 lines
2.2 KiB
Bash

#!/bin/bash
# SPDX-Version: 3.0
# SPDX-CreationInfo: 2025-06-17; WEIDNER, Marc S.; <msw@coresecret.dev>
# SPDX-ExternalRef: GIT https://git.coresecret.dev/msw/CISS.debian.installer.git
# SPDX-FileContributor: WEIDNER, Marc S.; Centurion Intelligence Consulting Agency
# SPDX-FileCopyrightText: 2024-2025; WEIDNER, Marc S.; <msw@coresecret.dev>
# SPDX-FileType: SOURCE
# SPDX-License-Identifier: EUPL-1.2 OR LicenseRef-CCLA-1.0
# SPDX-LicenseComment: This file is part of the CISS.debian.installer.secure framework.
# SPDX-PackageName: CISS.debian.installer
# SPDX-Security-Contact: security@coresecret.eu
#######################################
# Performing Branch Selection
# Globals:
# BASH_COMMAND
# BRANCH_URL
# HANDLER_BRA
# LINENO
# LOG_ERR
# MODULE_ERR
# PPID
# PWD
# Arguments:
# None
#######################################
0000_performing_branch_confirmation() {
clear
declare BRANCH_SELECTION=""
exec 2>&1
if [[ ${HANDLER_BRA,,} = 1 ]]; then
dialog --create-rc ~/.dialogrc
sed -i 's/screen_color = (CYAN,BLUE,ON)/screen_color = (WHITE,RED,ON)/' ~/.dialogrc
sed -i 's/title_color = (BLUE,WHITE,ON)/title_color = (RED,WHITE,ON)/' ~/.dialogrc
if BRANCH_SELECTION=$(dialog --ascii-lines \
--colors \
--title "! WARNING !" \
--backtitle "CISS.2025.hardened.debian.installer" \
--yes-label "yes" \
--no-label "No" \
--yesno "You are on:\nBranch 'Testing'.\nPlease confirm to proceed.\nHit 'Yes' to stay on Branch 'Testing'.\nHit 'No' to exit." 9 60 3>&1 1>&2 2>&3 3>&-); then
declare -g -r -x BRANCH_URL="https://cendev.eu/marc.weidner/CISS.2025.debian.installer/raw/branch/testing/"
else
clear
rm -f ~/.dialogrc
do_clean_exit "0" "${LINENO}" "${BASH_COMMAND}" "${MODULE_ERR}" "$$" "${PPID}" "${PWD}" "$-"
fi
else
declare -g -r -x BRANCH_URL="https://cendev.eu/marc.weidner/CISS.2025.debian.installer/raw/branch/master/"
fi
exec 2>> "${LOG_ERR}"
clear
if [[ ${HANDLER_BRA} = 1 ]]; then
do_log "info" "true" "Branch 'testing' confirmed: '${BRANCH_SELECTION}'."
fi
if [[ -f ~/.dialogrc ]]; then
rm -f ~/.dialogrc
fi
}
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh: