#!/bin/bash
sudo make install
sudo isobuilder --download_pkg     # 从网络仓库获取Ddeb包和Udeb包
sudo isobuilder --create_repo      # 构建deepin-cd需要的本地仓库
sudo isobuilder --create_iso       # 用内置的deepin-cd来完成制作光盘镜像
scp -r /data/general/isobuilder/deepin-cd/output/15/*.iso root@10.1.10.70:/data/pub-upload/deepin-cd/daily-build/kui/15/
scp -r /data/general/isobuilder/deepin-cd/output/15/*.list.gz root@10.1.10.70:/data/pub-upload/deepin-cd/daily-build/kui/15/
if [ $? -eq 0 ];then
	echo "ISO upload is ok! workdir will be clean!"
	sudo rm -rvf /data/isobuilder/*
else
	echo "ISO upload is failed! please manual clean workdir"
fi
