[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Creating end-user packages for msw

From: Greg Chicares
Subject: Re: [lmi] Creating end-user packages for msw
Date: Fri, 19 Mar 2010 19:17:49 +0000
User-agent: Thunderbird (Windows/20090812)

On 2008-04-22 15:52Z, Greg Chicares wrote:
> Packaging several monthly binary distributions for different end-
> user groups has become stressful if not nightmarish. It must be
> done in time for CDs to be received by field offices before the
> first of each month; but it can't be done until crediting rates
> are declared, which may be very close to the end of the month.

'workhorse.make' says:

# The first value assigned to 'd1' shows one possibility for the
# beginning date. It's deliberately overridden with another that sets
# the beginning date to the current date. The obvious y2038 problem is
# ignored because any breakage it causes will be obvious.

fardel_date_script := \
  d0=`$(DATE) +%Y-%m-01`; \
  d1=`$(DATE) --utc --date="$$d0 + 1 month         " +%s`; \
  d1=`$(DATE) --utc +%s`; \
  d2=`$(DATE) --utc --date="$$d0 + 2 months - 1 day" +%s`; \
  j1=`expr 2440587 + $$d1 / 86400`; \
  j2=`expr 2440587 + $$d2 / 86400`; \
  echo -n "$$j1 $$j2" >expiry; \

Now let me illustrate:

Fri Mar 19 19:17:37 GMTST 2010
$d0=`date +%Y-%m-01`
$date --utc --date="$d0 + 1 month         "
Thu Apr  1 00:00:00 UTC 2010
$date --utc --date="$d0 + 2 months - 1 day"
Fri Apr 30 00:00:00 UTC 2010

We could override $fardel_date_script if we want a different outcome
than the default provided, or change it if that's not an appropriate

I'd be glad to learn a better way to achieve an equivalent result.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]