[p4] My backup script, for review

R. Tyler Ballance tyler at bleepsoft.com
Sat Oct 28 04:03:41 PDT 2006


On Oct 27, 2006, at 11:15 PM, Chuck Karish wrote:

> On 10/27/06, Jeff With The Big Yellow Suit <jeff at drinktomi.com> wrote:
>> I have to second Ken Williams.  Cron doesn't give a
>> flying fsck what the scripts it runs are written in.
>> Just get the bang line right, make it executable,
>> and nothing else matters.
>
> Cron has its own idea what to do when it runs a script like
> the one I read, which has no shebang line.
>
> Cron will choke when a script starts with "#! /bin/zsh" and the
> other-shells package hasn't been installed.  "#! /bin/sh" (and
> sensible choices of what to call from the script) makes the
> script usable pretty much anywhere.

My default shell is always zsh, so its installed on every one of my  
machines. My rsync-backup machine has about a week and a half of  
daily backups tarballed on it, so I'm going to take a general stab in  
the dark that the script functions properly under cron (root's crontab)

Although I don't think it's pertinent whatsoever that I wrote the  
script targetted more at zsh as it's what I use regularly, it would  
be different however if I would have wrote a ruby script and used  
P4Ruby :P

Cheers.

R. Tyler Ballance: Lead Mac Developer at bleep. software
contact: tyler at bleepsoft.com | jabber: tyler at jabber.geekisp.com




More information about the perforce-user mailing list