gnumed-devel
[Top][All Lists]
Advanced

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

Re: [Gnumed-devel] Problems dumping database (Mac limitation on su -c)


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] Problems dumping database (Mac limitation on su -c)
Date: Mon, 24 Oct 2011 11:20:43 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Sun, Oct 23, 2011 at 06:22:00PM -0700, Jim Busser wrote:

> When on Mac OS calling tar as per the script
> 
>       gm-backup_database.sh
> 
> the flags
> 
>       -cfW
> 
> do not work as intended. W (verify) is not supported and, with only -cf on 
> Mac, one gets an uncompressed .tar archive.

Which is what we want.

> 1. would you be happy to insert in
> 
>       gm-backup_database.sh
> 
> beneath
> 
>       # tar and test it 
> 
> the comment
> 
>       # Note: Mac OS requires 'tar -cjf'

Since Mac does not support -W (verify) Mac users should set
VERIFY_TAR to "" in gnumed-backup.conf which will then do
what's needed.

> 2. where the script says
> 
>       # tar and test it
>       if test -z ${VERIFY_TAR} ; then
>               tar -cf ${BACKUP_FILENAME}.tar ${BACKUP_FILENAME}-database.sql 
> ${BACKUP_FILENAME}-roles.sql
>       else
>               tar -cWf ${BACKUP_FILENAME}.tar ${BACKUP_FILENAME}-database.sql 
> ${BACKUP_FILENAME}-roles.sql
>       fi ;
> 
> doesn't the test -z ${VERIFY_TAR} mean 'if verification is desired' in which 
> case doesn't the W flag belong with the 'if' instead of in the 'else' ?

"man test" says:


TEST(1)                                                                     
User Commands                                                                   
  TEST(1)

NAME
       test - check file types and compare values

SYNOPSIS
       test EXPRESSION

DESCRIPTION
       Exit with the status determined by EXPRESSION.

       -z STRING
              the length of STRING is zero

GNU coreutils 8.12.197-032bb                                                
September 2011                                                                  
  TEST(1)


Karsten
-- 
GPG key ID E4071346 @ gpg-keyserver.de
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346



reply via email to

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