git 实现的网站版本发布回退同步脚本

2015-07-28 0 877
git 实现的网站版本发布回退同步脚本
#!/bin/bash

#author sunbx@funshion.com
#date	2013-10-10
#远程服务器git仓库创建,以及对上游版本库的注册
#
project="project"
if [ $# -eq 0 ]
then
	echo "Usage: $0 <repository> <directory> "
	echo "	<repository>:remote server url"
	echo "  	like :example.com[:port]/path/to/repo.git/"
	echo "	<directory>:git_repo directory"
	exit
fi

cd $2
git init $project >> /dev/null
cd $project
git remote add shangyou file://$1 


if [ $? -eq 0 ] 
then 
    echo "########################"
    echo "      Success!"
    echo "#########################"
else
    echo "Fail!"
fi

遇见资源网 shell git 实现的网站版本发布回退同步脚本 http://www.ox520.com/17092.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务