由于俩网络,更新太不自动化。在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
尚未测试可用否。