Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 39AD3429E25 for ; Thu, 26 May 2011 15:12:26 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0.01 X-Spam-Level: X-Spam-Status: No, score=0.01 tagged_above=-999 required=5 tests=[T_MIME_NO_TEXT=0.01] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ign3qWv9Is7U for ; Thu, 26 May 2011 15:12:25 -0700 (PDT) Received: from arlo.cworth.org (arlo.cworth.org [50.43.72.2]) by olra.theworths.org (Postfix) with ESMTP id CB5D5431FB6 for ; Thu, 26 May 2011 15:12:25 -0700 (PDT) Received: from yoom.home.cworth.org (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id AFCA229A4E7; Thu, 26 May 2011 15:12:24 -0700 (PDT) Received: by yoom.home.cworth.org (Postfix, from userid 1000) id 6055025417E; Thu, 26 May 2011 15:12:24 -0700 (PDT) From: Carl Worth To: Felix Geller , notmuch@notmuchmail.org Subject: Re: [PATCH] Change in increment_mtime for BSD compatibility of test suite In-Reply-To: References: User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.3.1 (i486-pc-linux-gnu) Date: Thu, 26 May 2011 15:12:19 -0700 Message-ID: <87boypcdrw.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 22:12:26 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable On Wed, 25 May 2011 15:07:52 +0200, Felix Geller wrote: Non-text part: multipart/mixed Non-text part: multipart/signed > Use `-t' option rather than `-d' which is not supported by BSD's > touch. I'm not sure whether this is the cleanest way to do this, please > let me know if there is a better way. I don't know of a better way, but... > + last_mod_date=3D`date -j -f %Y%m%d%H%M%S \`stat -f %Sm -t %Y%m%d%H%M= %S ${dir}\` +%s` > increment_mtime_amount=3D$((increment_mtime_amount + 1)) > - touch -d "+${increment_mtime_amount} seconds" "$dir" > + new_date=3D`date -j -r ${last_mod_date} -v+${increment_mtime_amount}= S +%Y%m%d%H%M.%S` > + touch -t ${new_date} ${dir} $ date -j date: invalid option -- 'j' Try `date --help' for more information. :-P > There are additional changes > (e.g., sed does not support `-r' but instead `-E') but they seem to be > incompatible between GNU and BSD. What's the recommended way to handle > this? That sounds like something we could test inside our configure script. In addition to the current Makefile.config file it's creating, it could also create a little test-config.sh file for things like this. What do you think? =2DCarl =2D-=20 carl.d.worth@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk3e0EMACgkQ6JDdNq8qSWgpgwCfbTAkaeMwS9Y1Bew/lhhvHMsk vS8AnA9EYceeXdFlmyKlPk3JsEzNApPk =TZnd -----END PGP SIGNATURE----- --=-=-=--