gnu-arch-users
[Top][All Lists]
Advanced

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

Here it is: tla-add - was Re: [Gnu-arch-users] [OT] Re: rsync cygwin ->


From: Zenaan Harkness
Subject: Here it is: tla-add - was Re: [Gnu-arch-users] [OT] Re: rsync cygwin -> linux, umask?
Date: Sat, 02 Oct 2004 15:01:07 +1000

On Sat, 2004-10-02 at 14:49, Zenaan Harkness wrote:
> On Sat, 2004-10-02 at 14:09, Cameron Patrick wrote:
> > Zenaan Harkness wrote:
> > > What would work, but doesn't exist, is an rsync option --ignore-perms.
> > 
> > Isn't that the default if you don't specify -a or -p?
> 
> You're right.
> 
> I'd been using "standard" (as per examples) rsync -avuzb options,
> which of course includes the troublesome -a.
> 
> Replacing 'a' with the subset of a 'rlt' solves that problem.
> 
> And to make sure new files created on windows are 664, I'm about
> to wrap "tla add" (which gets run on Debian) to chmod prior to add.
> 
> And given rsync ignoring perms on syncs, We're set.

This didn't work as a function, since xargs doesn't seem to like shell
functions, so I dumped it in a script, and it seems to work just fine:

#!/bin/sh
for i in $@; do
   if [ -d $i ]; then
      chmod 775 $i
   else
      chmod 664 $i
   fi
   tla add $i
done


You'll notice a side effect of this script (besides the chmods) is that
you can use find and xargs to add stuff to tla (or shell globs) and all
args will be added.

I think that little things like this shouldn't be underestimated in the
"otherwise getting frightened away from arch" department.

Would it make sense for me to start an arch branch somewhere to add
these sorts of scripts, for the use of others, or would they not be
added anywhere else?

thanks again
zen




reply via email to

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