任何rsync的类似物?

问题描述 投票:0回答:3
我需要一些类似物的ant。问题是将文件从源目录复制到以前使用脚本

完成的子目录集

rsync

感谢任何帮助
	

您可以使用

Exec
ant rsync
3个回答
8
投票
调用

Rsync,您可以使用java任务调用jarsyncjava-sync,或者您可以创建customanttask来调用这些库中的任何一个库. Zombie问题,但要发布

https://gist.github.com/garethr/878364

7
投票
rsync -r --ignore-existing $BASE_DIR/common/config/* $BASE_DIR/config

再次实施死灵法师的员工:蚂蚁在蚂蚁1.6
时有一项
Sync

0
投票
尽管在行为上可能不像使用

<project name="{{ name }}" default="help" basedir="."> <property name="username" value="{{ username }}"/> <property name="host" value="{{ host }}"/> <property name="dir" value="/srv/{{ path }}/"/> <tstamp> <format property="TODAY_UK" pattern="yyyyMMddhhmmss" locale="en,UK"/> </tstamp> <target name="help" description="show available commands" > <exec executable="ant" dir="." failonerror="true"> <arg value="-p"/> </exec> </target> <target name="deploy-to" description="show where we are deploying to" > <echo>${username}@${host}:${dir}</echo> </target> <target name="deploy" description="deploy usng rsync" > <exec executable="rsync" dir="." failonerror="true"> <arg value="-r"/> <arg value="."/> <arg value="${username}@${host}:${dir}"/> <arg value="--exclude-from=rsync.excludes"/> <arg value="-v"/> </exec> </target> <target name="deploy-test" description="test deploy usng rsync with the dry run flag set" > <exec executable="rsync" dir="." failonerror="true"> <arg value="-r"/> <arg value="."/> <arg value="${username}@${host}:${dir}"/> <arg value="--exclude-from=rsync.excludes"/> <arg value="--dry-run"/> <arg value="-v"/> </exec> </target> <target name="backup" description="backup site" > <exec executable="scp" dir="." failonerror="true"> <arg value="-r"/> <arg value="${username}@${host}:${dir}"/> <arg value="backups/${TODAY_UK}"/> </exec> </target> </project> 来调用exec

rsync

,但它可以允许您使用资源收集而不是实际文件。
    

最新问题
© www.soinside.com 2019 - 2024. All rights reserved.