-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
63 lines (53 loc) · 2.26 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?xml version="1.0" encoding="UTF-8"?>
<!--
An ant build file for synching files
@author LightCube Solutions
@link http://www.lightcubesolutions.com
@copyright Copyright (C) 2009 LightCube Solutions, LLC. All rights reserved.
@license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
-->
<project name="LFS LiveCD Trunk" default="rsync-i686" basedir=".">
<description>Ant Build File</description>
<!-- load variables from config file -->
<property name="cfg.configFile" location="antconfig.txt" />
<loadproperties srcfile="${cfg.configFile}" />
<!--config file values
cfg.name=RBCProject
cfg.localhostRoot=
rsync.server=dev.lightcube.us
rsync.user=username
rsync.dir=/home/username/public_html/RBCProject
-->
<property name="cfg.comName" value="${cfg.name}" />
<target name="info" description="prints information">
<echo message="Project: ${cfg.name}" />
<tstamp>
<format property="buildtime" pattern="yyyy-MM-dd'T'HH:mm:ss" />
</tstamp>
<echo message="Buildtime: ${buildtime}" />
</target>
<target name="update_localhost" description="attemps to update files on localhost server with files from working directory">
<condition property="destdir" value="${tmpdir}" else="${cfg.localhostRoot}" >
<available file="${tmpdir}" type="dir" />
</condition>
<copy todir="${destdir}" preservelastmodified="true" overwrite="true">
<fileset dir="." />
</copy>
</target>
<target name="rsync-i686">
<exec executable="mktemp" outputproperty="rawtmpdir">
<arg line="-d -t XXXXXXXXXXXX" />
</exec>
<exec executable="cygpath" osfamily="windows" outputproperty="wintmpdir">
<arg line="-w ${rawtmpdir}" />
</exec>
<condition property="tmpdir" value="${wintmpdir}" else="${rawtmpdir}">
<os family="windows" />
</condition>
<antcall target="update_localhost"></antcall>
<exec executable="rsync" dir="${tmpdir}">
<arg line="-aOvz --chmod=g+w,Da+rX,Fa+r,F-X --exclude-from=rsync_excludes . [email protected]:${rsync.dir}/" />
</exec>
<delete dir="${tmpdir}" />
</target>
</project>