php更新git,粗暴的手动更新方式等效git更新

由于俩网络,更新太不自动化。在github上,能够通过 commit 看到更新后的文件。按行保存如下方式。

# file.list

Yii.php

backend/views/site/dashboard.php

common/behaviors/CategoryBehavior.php

common/helpers/StringHelper.php

common/modules/attachment/Module.php

common/modules/attachment/actions/UploadAction.php

common/modules/attachment/actions/UploadController.php

common/modules/attachment/components/FilesystemAdapter.php

common/modules/attachment/components/FilesystemManager.php

common/modules/attachment/components/Storage.php

common/modules/attachment/components/UploadedFile.php

common/modules/attachment/components/contracts/Cloud.php

common/modules/attachment/components/contracts/Factory.php

common/modules/attachment/components/contracts/FileNotFoundException.php

common/modules/attachment/components/contracts/Filesystem.php

common/modules/attachment/components/contracts/ImageProcessor.php

common/modules/attachment/components/flysystem/LocalAdapter.php

common/modules/attachment/components/flysystem/LocalFilesystem.php

common/modules/attachment/components/flysystem/QiniuAdapter.php

common/modules/attachment/components/flysystem/QiniuFilesystem.php

common/modules/attachment/components/image/Local.php

common/modules/attachment/components/image/Processor.php

common/modules/attachment/components/image/Qiniu.php

common/modules/attachment/config.php

common/modules/attachment/models/Attachment.php

common/modules/message/frontend/views/default/create.php

common/modules/message/frontend/views/default/index.php

common/modules/user/frontend/controllers/SettingsController.php

common/modules/user/frontend/views/default/index.php

common/modules/user/models/Profile.php

common/modules/user/models/Token.php

database/migrations/m160726_093217_create_user_table.php

frontend/themes/basic/suggest/index.php

frontend/widgets/comment/views/create.php

目的文件夹为 old,新文件夹为 new,使用命令行如下

#! /bin/bash

while read line

do

if [ -a $line ] ; then

cp $line ../old/$line

else

rm ../old/$line

fi

done < ./file.list

尚未测试可用否。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值