Re: refdb-backup portability and design

"Markus Hoenicka" <[email protected]>
Newsgroups gmane.text.refdb.devel
Message-ID <[email protected]>
Markus Hoenicka writes:
 > [ "${backup_dir:0:1}" != "/" ] && \
 > 
 > Can you work around this?
 > 

ok, while we're at it... For testing purposes I asked bash to run the
script and bumped into another portability issue. This time it's the
mktemp implementations. On the BSDs, mktemp expects either a filename
pattern or a prefix to construct the filename. Calling it without an
argument doesn't work. The following examples are from the FreeBSD
mktemp man page and show the two usages allowed here:

 TMPFILE=`mktemp /tmp/${tempfoo}.XXXXXX`

The 'X'es will be replaced by characters to make the name unique.

 tempfoo=`basename $0`
 TMPFILE=`mktemp -t ${tempfoo}`

The value of ${tempfoo} will be used as a prefix for the unique
filename.

Does Linux support one of these usages?

regards,
Markus

-- 
Markus Hoenicka
[email protected]
(Spam-protected email: replace the quadrupeds with "mhoenicka")
http://www.mhoenicka.de



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.