9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Bakul Shah <bakul@bitblocks.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] union directories exploration
Date: Wed, 19 Sep 2012 00:42:03 -0700	[thread overview]
Message-ID: <20120919074203.29730B827@mail.bitblocks.com> (raw)
In-Reply-To: Your message of "Wed, 19 Sep 2012 08:47:33 +0200." <9e333833932a9ea6bcc1a0a7594ccd19@rei2.9hal>

Thanks!

On Wed, 19 Sep 2012 08:47:33 +0200 cinap_lenrek@gmx.de  wrote:
> this has been done before. i can't remember who wrote it
> and i couldnt find it in the contrib index.
>
> #!/bin/rc
>
> fn get_dirs {
> 	tmp = /tmp/$pid ^_dirs
> 	echo -n > $tmp
>
> 	for (f in `{du -nf $root_in | awk '{print $2}' })
> 		ls -l $f | grep '^d' | awk '{print $10}' >> $tmp
> 	dirs = `{sort $tmp}
> 	rm $tmp
> }
>
> root_in=$1
> root_out=$2
>
> if(~ $3 '')
> 	get_dirs;
> if not
> 	dirs = `{cat $3};
>
> for(i in $dirs){
> 	o=`{echo $i | awk '{gsub(ENVIRON["root_in"], ENVIRON["root_out"], $0);
> print}'}
> 	echo bind -bc $i $o
> }
>
>
> theres also divergefs.
>
> --
> cinap
>



      reply	other threads:[~2012-09-19  7:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-19  6:31 Bakul Shah
2012-09-19  6:47 ` cinap_lenrek
2012-09-19  7:42   ` Bakul Shah [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120919074203.29730B827@mail.bitblocks.com \
    --to=bakul@bitblocks.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).