[archiso2dual] Check if is a core.iso before exec core_* functions

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
This commit is contained in:
Gerardo Exequiel Pozzi 2010-07-09 18:51:52 -03:00
parent 6adf48d06b
commit 7a71865e0a

View file

@ -23,6 +23,7 @@ appname=${0##*/}
_error="0" _error="0"
_confirm="n" _confirm="n"
_v="" _v=""
_iscoreiso=n
iso_umount() { iso_umount() {
echo "Executing: ${FUNCNAME}" echo "Executing: ${FUNCNAME}"
@ -150,6 +151,13 @@ core_pkgs_extract() {
done done
} }
check_if_core_medium() {
echo "Executing: ${FUNCNAME}"
if [ -f ${work_dir}/iso/i686/core-pkgs.sqfs ] && [ -f ${work_dir}/iso/x86_64/core-pkgs.sqfs ]; then
_iscoreiso=y
fi
}
root_image_extract() { root_image_extract() {
echo "Executing: ${FUNCNAME}" echo "Executing: ${FUNCNAME}"
for _arch in i686 x86_64; do for _arch in i686 x86_64; do
@ -357,12 +365,12 @@ if [ "${_confirm}" != "y" ]; then
echo "If configuration is correct, re-execute with -y" echo "If configuration is correct, re-execute with -y"
exit 1 exit 1
fi fi
make_workspace make_workspace
iso_mount iso_mount
kernel_copy kernel_copy
isolinux_copy isolinux_copy
squashfs_copy squashfs_copy
check_if_core_medium
iso_umount iso_umount
isolinuxcfg_copy isolinuxcfg_copy
isomounts_copy isomounts_copy
@ -371,10 +379,14 @@ if [ ${profile_type} = "full" ] || [ ${profile_type} = "split" ]; then
if [ ${profile_type} = "full" ]; then if [ ${profile_type} = "full" ]; then
root_image_purge root_image_purge
fi fi
if [ ${_iscoreiso} = "y" ]; then
core_pkgs_extract core_pkgs_extract
fi
usrshare_make_image usrshare_make_image
libmodules_make_image libmodules_make_image
root_image_make_image root_image_make_image
if [ ${_iscoreiso} = "y" ]; then
core_pkgs_make_image core_pkgs_make_image
fi
fi fi
make_iso make_iso