diff options
Diffstat (limited to 'helpers/lh_chroot_tasks')
-rwxr-xr-x | helpers/lh_chroot_tasks | 72 |
1 files changed, 30 insertions, 42 deletions
diff --git a/helpers/lh_chroot_tasks b/helpers/lh_chroot_tasks index 7427e97..64cd47f 100755 --- a/helpers/lh_chroot_tasks +++ b/helpers/lh_chroot_tasks @@ -50,48 +50,36 @@ then # Restoring cache Restore_cache cache/chroot_tasks - if [ ! -f chroot/usr/bin/aptitude ] - then - PACKAGES="${PACKAGES} aptitude" - fi - - if [ ! -f chroot/usr/bin/tasksel ] - then - PACKAGES="${PACKAGES} tasksel" - fi - - if [ -n "${PACKAGES}" ] - then - # Installing symlinks - case "${LH_APT}" in - apt|apt-get) - Chroot "apt-get install --yes ${PACKAGES}" - ;; - - aptitude) - Chroot "aptitude install --assume-yes ${PACKAGES}" - ;; - esac - fi - - for TASK in ${LIVE_TASKS} - do - Chroot "tasksel --debconf-apt-progress --logstderr install ${TASK}" - done - - if [ -n "${PACKAGES}" ] - then - # Removing packages - case "${LH_APT}" in - apt|apt-get) - Chroot "apt-get remove --purge --yes ${PACKAGES}" - ;; - - aptitude) - Chroot "aptitude purge --assume-yes ${PACKAGES}" - ;; - esac - fi + # Checking depends + case "${LH_TASKSEL}" in + aptitude) + Check_package chroot/usr/bin/aptitude aptitude + ;; + + tasksel) + Check_package chroot/usr/bin/tasksel tasksel + ;; + esac + + # Installing depends + Install_package + + # Installing tasks + case "${LH_TASKSEL}" in + aptitude) + Chroot "aptitude install --assume-yes ${LIVE_TASKS}" + ;; + + tasksel) + for TASK in ${LIVE_TASKS} + do + Chroot "tasksel --debconf-apt-progress --logstderr install ${TASK}" + done + ;; + esac + + # Removing depends + Remove_package # Saving cache Save_cache cache/chroot_tasks |