更新版本的脚本


#!/bin/bash

# Used for publish new version.
# @auth: Fred.
# @date: 2016/06/26

set -e

if [ "$#" -ne 1 ]; then
echo "Deploy a new version of branch dscapi/develop_master."
echo "Usage: $0 DIRECTORY" >&2
echo ""
echo ""
exit 1
fi

TARGETDIR=$1

git clone -b develop_master git@git.local.ybzf.com:api_service/dscapi.git "$TARGETDIR"

rm connection
ln -s "$TARGETDIR" connection

cd connection
git branch
cd ..