9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] linux / p9p abomination
@ 2017-03-01 10:16 dexen deVries
  2017-03-01 12:10 ` erik quanstrom
  0 siblings, 1 reply; 3+ messages in thread
From: dexen deVries @ 2017-03-01 10:16 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 264 bytes --]

runs build upon file change, repeats on failure

#!/usr/bin/env rc

flag e +

cmd = ( $* )

watch = ( inotifywait -q --recursive -e modify -e moved_to -e create -t 3 .
)

while (true)
    if ($watch)
        while (!$cmd)
            $watch || true

[-- Attachment #2: Type: text/html, Size: 336 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] linux / p9p abomination
  2017-03-01 10:16 [9fans] linux / p9p abomination dexen deVries
@ 2017-03-01 12:10 ` erik quanstrom
  2017-03-01 13:15   ` dexen deVries
  0 siblings, 1 reply; 3+ messages in thread
From: erik quanstrom @ 2017-03-01 12:10 UTC (permalink / raw)
  To: 9fans

> while (true)
>     if ($watch)
>         while (!$cmd)
>             $watch || true

rc allows empty conditionals, which are true.

- erik



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] linux / p9p abomination
  2017-03-01 12:10 ` erik quanstrom
@ 2017-03-01 13:15   ` dexen deVries
  0 siblings, 0 replies; 3+ messages in thread
From: dexen deVries @ 2017-03-01 13:15 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

rc is a thing of beauty.

apologies for HTML in the previous message.

On Wed, Mar 1, 2017 at 1:10 PM, erik quanstrom <quanstro@quanstro.net> wrote:
>> while (true)
>>     if ($watch)
>>         while (!$cmd)
>>             $watch || true
>
> rc allows empty conditionals, which are true.
>
> - erik
>



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-03-01 13:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-01 10:16 [9fans] linux / p9p abomination dexen deVries
2017-03-01 12:10 ` erik quanstrom
2017-03-01 13:15   ` dexen deVries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).