Re: [Refdb-devel] refdb-backup portability and design
Status: Beta
Brought to you by:
mhoenicka
From: Markus H. <mar...@mh...> - 2005-02-02 21:15:27
|
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 mar...@ca... (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de |