Distro_Builder/CONFIG.sh

85 lines
2.0 KiB
Bash
Raw Normal View History

2020-05-02 00:00:17 +00:00
#!/bin/bash
# ---- Setup Aliases ---- #
shopt -s expand_aliases
alias echo="echo -e"
# ---- Setup Variables ---- #
2020-05-02 00:12:18 +00:00
SCRIPT_PATH="$( cd "$(dirname "")" >/dev/null 2>&1 ; pwd -P )";
2020-05-02 00:00:17 +00:00
CHROOT_PTH="./work/chroot"
# Resolution of Xephyr... ex: 1920x1080 or 1600x900, etc
RESOLUTION="1920x1080"
# Screen-id of Xephyr... ex: :10 or :1.0, etc
# Note: Don't use :0 or :0.0 as they are your system's.
ID=":10"
# Your system release... this is set by set_system_release
# function above and can be safetly ignored
SYSTEM_RELEASE=""
# $RELEASE is the version of Ubuntu/Debian you intend to build an ISO for.
# Some options: xenal, bionic, disco, focal
# Versions: xenal (16.0.4), bionic (18.04), disco (19.04), focal (20.04)
RELEASE=""
# $ARCH is the target processor architecture.
# For old 32 bit x86 systems use i386.
# For newer 64-bit x86 systems (also known as x64, x86_64, Intel 64, and AMD64) use amd64.
ARCH=""
# the name of your distro and ISO
OS_NAME=""
# The user of the live boot
LIVE_USER=""
# ---- Call CONFIG Methods Here As Needed ---- #
set_system_release;
2020-05-02 00:12:18 +00:00
cd "${SCRIPT_PATH}";
2020-05-02 01:10:29 +00:00
echo "Base Dir: " $(pwd) "\n";
# Make work structure
mkdir -p "${CHROOT_PTH}"
mkdir -p image/{casper,isolinux,install}
2020-05-02 00:00:17 +00:00
# ---- DO NOT CHANGE OR REMOVE UNLESS YOU KNOW WHAT YOU ARE DOING ---- #
# Clean manifest-desktop file of unneeded parts
REMOVE='ubiquity ubiquity-frontend-gtk ubiquity-frontend-kde casper lupin-casper live-initramfs user-setup discover1 xresprobe os-prober libdebian-installer4'
2020-05-02 01:10:29 +00:00
# The system release version working from
function set_system_release() {
IN=$(cat /etc/os-release | grep "VERSION_CODENAME")
ARRY=(${IN//=/ })
SYSTEM_RELEASE="${ARRY[1]}"
}
function confirm_dialouge() {
echo $1
read -p "(yY/Nn) --> " ANSR
while [[ $ANSR != "y" ]] && [[ $ANSR != "Y" ]] && \
[[ $ANSR != "n" ]] && [[ $ANSR != "N" ]]
do
read -p "(yY/Nn) --> " ANSR
done
if [[ $ANSR == "n" ]] || [[ $ANSR == "N" ]]; then
return 1
fi
return 0
}