#/bin/bash
# Data TianYaWei 20171117
function changeGitFile()
{
	cd /home/quant_group/$1/.git
	if [ $? = 0 ]; then
		git remote set-url origin $2
	else
		echo "无该项目，跳过"
	fi
	
}

items=`node /home/qa-deploy-utils/qa_shell_script/config_server/get_project_config.js -type multi -attr git_path`

for item in $items
do
	var=${item//|/ }
	echo "$var"
	changeGitFile $var
done