update build-distro script

parent 7f02e88b
......@@ -7,24 +7,49 @@ VM=false
CLEAN=false
DESKTOP_ENVS=() # Список выбранных рабочих окружений (например, gnome, hyprland)
APTCONF=/etc/eterbuild/apt/apt.conf.sisyphus
if [ -z "$VMDIR" ]; then
VMDIR="/var/ftp/pvt/ISO/testing/template/iso"
fi
if [ -z "$APTCONF" ]; then
APTCONF="/etc/eterbuild/apt/apt.conf.sisyphus"
fi
if [ -z "$PROFILESDIR" ]; then
PROFILESDIR="/home/$USER/Projects/ximper-builder/mkimage-profiles"
fi
print_error() {
printf "\033[1;31m%s\033[0m\n" "$1"
}
print_green() {
printf "\033[1;32m%s\033[0m\n" "$1"
}
print_yellow() {
printf "\033[1;33m%s\033[0m\n" "$1"
}
print_blue() {
printf "\033[1;34m%s\033[0m\n" "$1"
}
print_red() {
printf "\033[1;31m%s\033[0m\n" "$1"
}
print_paths() {
echo "____________________"
print_blue "VMDIR: $VMDIR"
print_blue "PROFILESDIR: $PROFILESDIR"
print_blue "APTCONF: $APTCONF"
}
cleartmp() {
[ "$CLEAN" == true ] || return
echo "____________________"
/home/"$USER"/Projects/000_distro/cleartmp.sh -i
/home/"$USER"/Projects/ximper-builder/bin/cleartmp -i
# shellcheck disable=SC2012
# Удаляем все, кроме самого нового
[ "$VER" == "devel" ] && ls -t "$VMDIR"/ximper-"$desktop_env""$iso_suffix"-devel-*-x86_64.iso | tail -n +2 | xargs -I {} rm -v -- {}
......@@ -82,10 +107,10 @@ makebuild() {
iso_suffix=""
if [ "$build_type" == "nvidia" ]; then
print_yellow "Сборка с NVIDIA и $desktop_env"
print_blue "Сборка с NVIDIA и $desktop_env"
iso_suffix="-nvidia"
else
print_yellow "Сборка по умолчанию с $desktop_env"
print_blue "Сборка по умолчанию с $desktop_env"
fi
# Обработка незакоммиченных изменений перед началом сборки
......@@ -112,6 +137,7 @@ makebuild() {
# Отмена временного коммита после завершения сборки
revert_temp_commit
echo "____________________"
}
pushd "$PROFILESDIR" || exit
......@@ -189,13 +215,20 @@ fi
# Обработка версии дистрибутива
if [ -n "$1" ]; then
VER=$1
print_yellow "VERSION: $VER"
echo "____________________"
if [ "$VER" == "devel" ]; then
print_yellow "VERSION: $VER"
else
print_green "VERSION: $VER"
fi
shift
else
print_error "Не указана версия дистрибутива."
exit 1
fi
print_paths
# Генерация списка задач на сборку
build_list=()
......@@ -220,4 +253,4 @@ done
cleartmp
popd || exit
echo "ЗАВЕРШЕНО"
print_green "ЗАВЕРШЕНО"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment