#!/bin/bash
OS_VERSION=/etc/os-version
DEEPIN_VERSION=/etc/deepin-version

if [[ ! -e $OS_VERSION ]]
then
	if [[ ! -e $DEEPIN_VERSION ]]
	then
		echo "Not Support System! /etc/os-version NOT FOUND!!" && exit -1
	fi
fi

Edition=`grep "EditionName" $OS_VERSION |head -n 1 |cut -d '=' -f 2`
Minor=`grep "MinorVersion" $OS_VERSION |head -n 1 |cut -d '=' -f 2|cut -c 1-3`



case "$Edition" in
	"Community")
		REPO=deepin
		REPO_PPA=beige-testing
		CODENAME=beige
		CODENAME_PPA_UNSTABLE=unstable/crimson
		;;
esac



cat > /etc/apt/sources.list.d/deepin-unstable-source.list <<EOF
## Generated by deepin-unstable-source.
deb https://proposed-packages.deepin.com/beige-testing/ $CODENAME_PPA_UNSTABLE main commercial community 
EOF

