#!/bin/bash

set -e

if [[ "${is_minimal}" = "true" ]]; then
    return 0
elif [[ "${is_ghost}" = "true" ]]; then
    return 0
fi

### automatically install the packages listed in the /cdrom/.kylin-post-packages
if [[ -f /cdrom/.kylin-post-packages ]]; then
    msg "安装光盘源列表包"
    /bin/sh -c "unset DEBIAN_HAS_FRONTEND && apt-get install -y $(cat /cdrom/.kylin-post-packages | grep -v ^\# | xargs)"
fi
