implement sanity check for build dir

This commit is contained in:
udeved 2015-01-15 17:26:41 +01:00
parent ea20904c11
commit 6722d7e14d
3 changed files with 20 additions and 0 deletions

View file

@ -1022,6 +1022,7 @@ build_iso(){
msg "Start building [${buildset_iso}]"
for prof in $(cat ${sets_dir_iso}/${buildset_iso}.set); do
cd $prof
check_dir_iso
load_desktop_definition
load_profile
work_dir=${chroots_iso}/$prof/${arch}
@ -1031,6 +1032,7 @@ build_iso(){
msg "Finished building [${buildset_iso}]"
else
cd ${buildset_iso}
check_dir_iso
load_desktop_definition
load_profile
work_dir=${chroots_iso}/${buildset_iso}/${arch}

View file

@ -88,6 +88,7 @@ chroot_build(){
msg "Start building [${buildset_pkg}]"
for pkg in $(cat ${sets_dir_pkg}/${buildset_pkg}.set); do
cd $pkg
check_dir_pkg
for p in ${blacklist_trigger[@]}; do
[[ $pkg == $p ]] && blacklist_pkg "${work_dir}"
done
@ -99,6 +100,7 @@ chroot_build(){
msg "Finished building [${buildset_pkg}]"
else
cd ${buildset_pkg}
check_dir_pkg
for p in ${blacklist_trigger[@]}; do
[[ ${buildset_pkg} == $p ]] && blacklist_pkg "${work_dir}"
done

View file

@ -393,3 +393,19 @@ load_user_info(){
USER_CONFIG="$USER_HOME/.config"
}
check_dir_pkg(){
if [[ -f PKGBUILD ]]; then
continue
else
break
fi
}
check_dir_iso(){
if [[ -f displaymanager ]] && [[ -f initsys ]]; then
continue
else
break
fi
}