build-distro: remove cleartmp wrapper

parent da1b8fa4
......@@ -25,15 +25,6 @@ print_build_info() {
echo "--------------------"
}
cleartmp() {
[ "$CLEAN" == true ] || return
"$BUILDERDIR"/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 -- {}
}
handle_uncommitted_changes() {
# Проверка наличия незакоммиченных изменений
if git diff-index --quiet HEAD --; then
......@@ -65,9 +56,8 @@ revert_temp_commit() {
ifexit() {
print_yellow "Скрипт принудительно завершен. Выполняю некоторые действия..."
revert_temp_commit
CLEAN=true cleartmp
"$BUILDERDIR"/bin/cleartmp -i
remove_tmp "$buildertmp"
CLEAN=false
exit 1
}
......@@ -75,11 +65,15 @@ ifexit() {
trap ifexit SIGINT SIGTERM
makebuild() {
cleartmp
local build_type=$1
desktop_env=$2
iso_suffix=""
local desktop_env=$2
local iso_suffix=""
if [ "$CLEAN" == true ]; then
"$BUILDERDIR"/bin/cleartmp -i
# shellcheck disable=SC2012
[ "$VER" == "devel" ] && ls -t "$VMDIR"/ximper-"$desktop_env""$iso_suffix"-devel-*-x86_64.iso 2>/dev/null | tail -n +2 | xargs -I {} rm -v -- {}
fi
if [ "$build_type" == "nvidia" ]; then
print_blue "Сборка с NVIDIA и $desktop_env"
......@@ -216,7 +210,7 @@ for desktop_env in "${DESKTOP_ENVS[@]}"; do
done
revert_temp_commit
cleartmp
[ "$CLEAN" == true ] && "$BUILDERDIR"/bin/cleartmp -i
popd > /dev/null || exit
remove_tmp "$buildertmp"
......
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