ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 須佐忠弘 <susatadah...@gmail.com>
Subject Idea-- Tstamp attribute
Date Fri, 21 Oct 2005 04:02:43 GMT
Hi,
I want to add "value"attribute to TstampTask.

Please let me know if there are any problem in this idea or better ideas  .

Thanks,

--usage--
ant -Dday=20051011 clean.logfile
...
[delete]/var/log/20050511/*.log


--dir--
/var/log/20050510/*.log
/var/log/20050511/*.log
/var/log/20050512/*.log
....

--idea--<not only current time, but also manual-input>
<target name="clean.logfile">
  <tstamp>
      <format property="logdate"
              pattern="yyyyMMdd"
              value="${day}"
              offset="-5"
              unit="month"/>
  </tstamp>
  <delete  dir="/var/log/${logdate}"/>
</target>

if value=="" or value not-defined then using current time.

--example scene--
executing as previous day(not today) during system recovery.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message