cleartmp: fix mk-p cleaning

parent 01aa6473
#!/bin/bash
BASE="/tmp/.private/$USER"
# базовые функции
# shellcheck disable=SC1091
. "$(dirname "$0")/common"
......@@ -9,9 +11,25 @@ print_blue "Очистка...."
if [ -d "$PROFILESDIR"/build ]; then
pushd "$PROFILESDIR" > /dev/null || exit
make clean
rm -rf "$TMP"/mkimage-profiles.build.*
rm -rf ./build
popd > /dev/null || exit
for builddir in "$BASE"/mkimage-profiles.build.*; do
[ -d "$builddir" ] || continue
if [ -d "$builddir/.work/chroot" ]; then
hsh-rmchroot "$builddir/.work" || echo "Ошибка при удалении $builddir/.work"
fi
for sub in main live stage1; do
if [ -d "$builddir/$sub/.work/chroot" ]; then
hsh-rmchroot "$builddir/$sub/.work" || echo "Ошибка при удалении $builddir/$sub/.work"
fi
done
rm -rf "$builddir"
done
print_green "mkimage-profiles очищен"
fi
......
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