#!/bin/bash

set -x

if [ -e "/usr/lib/isobuilder/CONF.sh" ];then
        source /usr/lib/isobuilder/CONF.sh
elif [ -e "./CONF.sh" ];then
        source ./CONF.sh
else
        echo "CONF.sh is not exist"
        exit 0
fi

cat > ${WORK_DIR}/deepin-cd/deepin_build.sh << EOF
#!/bin/bash
export rootdir=\$(pwd)
source  \${rootdir}/deepin/${DEBVERSION}/${CODENAME}/CONF.sh
bash \${rootdir}/deepin/${DEBVERSION}/${CODENAME}/build.sh
EOF
