summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLV-426 <lv-426@taproot.org.il>2015-05-01 02:41:02 +0300
committerLV-426 <lv-426@taproot.org.il>2015-05-01 03:17:30 +0300
commit2c614eb0f853f6e68e9a89ac4b062157689392ac (patch)
treec0e28841e1efc70d70ae4cd0f1101e32a4c66441
parent49716b975c9aef38b16c4e6c6d95f61cfafe5ccb (diff)
build.ant: .ssh/config aware scp macro
-rw-r--r--build.ant17
1 files changed, 17 insertions, 0 deletions
diff --git a/build.ant b/build.ant
index 41df3de4..78807c58 100644
--- a/build.ant
+++ b/build.ant
@@ -25,6 +25,23 @@
</sequential>
</macrodef>
+ <macrodef name="scp_macro"
+ description="a .ssh/config aware scp invocation macro">
+ <!-- user arg intentionally unsupported, rely on .ssh/config -->
+ <attribute name="src" />
+ <attribute name="todir" />
+ <attribute name="remotehost" />
+ <attribute name="extraOpts" default="" />
+
+ <sequential>
+ <exec dir="${basedir}" executable="/usr/bin/scp" failonerror="true">
+ <arg line="@{extraOpts}" />
+ <arg line="@{src}" />
+ <arg value="@{remotehost}:@{todir}" />
+ </exec>
+ </sequential>
+ </macrodef>
+
<macrodef name="client-optimize">
<attribute name="root" />
<attribute name="build" />