[util-pkg/iso] little cosmetics

This commit is contained in:
udeved 2015-02-23 19:33:11 +01:00
parent ae73305030
commit d7e81503c4
2 changed files with 6 additions and 9 deletions

View file

@ -103,17 +103,18 @@ prepare_cachedirs(){
} }
clean_cache(){ clean_cache(){
msg "Cleaning [$1] ..." msg2 "Cleaning [$1] ..."
find "$1" -name '*.pkg.tar.xz' -delete &>/dev/null find "$1" -name '*.pkg.tar.xz' -delete &>/dev/null
} }
clean_chroots(){ clean_chroots(){
msg "Cleaning up ..."
for image in "$1"/*-image; do for image in "$1"/*-image; do
[[ -d ${image} ]] || continue [[ -d ${image} ]] || continue
if [[ $(basename "${image}") != "pkgs-image" ]] || \ if [[ $(basename "${image}") != "pkgs-image" ]] || \
[[ $(basename "${image}") != "lng-image" ]];then [[ $(basename "${image}") != "lng-image" ]];then
msg2 "Deleting chroot image '$(basename "${image}")'..." msg2 "Deleting chroot '$(basename "${image}")'..."
lock 9 "${image}.lock" "Locking chroot image '${image}'" lock 9 "${image}.lock" "Locking chroot '${image}'"
if [[ "$(stat -f -c %T "${image}")" == btrfs ]]; then if [[ "$(stat -f -c %T "${image}")" == btrfs ]]; then
{ type -P btrfs && btrfs subvolume delete "${image}"; } &>/dev/null { type -P btrfs && btrfs subvolume delete "${image}"; } &>/dev/null
fi fi
@ -122,12 +123,6 @@ clean_chroots(){
done done
exec 9>&- exec 9>&-
rm -rf --one-file-system "$1" rm -rf --one-file-system "$1"
# if [[ -d $1 ]];then
# msg "Removing [$1] ..."
# # rm -r $1
# rm -rf --one-file-system "$1"
# fi
} }
configure_custom_image(){ configure_custom_image(){

View file

@ -121,6 +121,7 @@ chroot_build(){
} }
chroot_init(){ chroot_init(){
local timer=$(get_timer)
if ${clean_first}; then if ${clean_first}; then
chroot_clean chroot_clean
chroot_create chroot_create
@ -129,6 +130,7 @@ chroot_init(){
else else
chroot_update chroot_update
fi fi
msg3 "Time ${FUNCNAME}: $(elapsed_time ${timer}) minutes"
} }
sign_pkgs(){ sign_pkgs(){