revno 734 introduces bashism ($RANDOM)

Bug #950977 reported by Patrick Welche
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
intltool
New
Undecided
Unassigned

Bug Description

$RANDOM is rare amongst shells, but is implemented in bash. It looks as though it is being used to create a unique filename. In that case, maybe use mktemp instead? (Available in many OS and also provided by coreutils, so I think more portable than $RANDOM)

Revision history for this message
Hib Eris (hiberis) wrote :

See: https://bugs.launchpad.net/intltool/+bug/903340/comments/12

"according to http://www.gnu.org/software/autoconf/manual/autoconf.html, mktemp is not always available on all systems."

So I choose to use

_it_tmp_dir=tmp.intltool.$RANDOM && mkdir _it_tmp_dir

instead of

_it_tmp_dir=`mktemp -d tmp.XXXXXXXXXX`

Revision history for this message
Patrick Welche (prlw1) wrote :

Agreed that mktemp is not always available on all systems. However $RANDOM is even less likely!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.