git 实现的网站版本发布回退同步脚本
发布时间:2020-12-15 07:09:57 所属栏目:安全 来源:网络整理
导读:今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 #!/bin/bash#author [email?protected]#date2013-10-10#远程服务器git仓库创建,以及对上游版本库的注册#project="project"if [ $# -eq 0 ]thenecho "
以下代码由PHP站长网 52php.cn收集自互联网 现在PHP站长网小编把它分享给大家,仅供参考 #!/bin/bash #author [email?protected] #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 以上内容由PHP站长网【52php.cn】收集整理供大家参考研究 如果以上内容对您有帮助,欢迎收藏、点赞、推荐、分享。 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |