[Toybox] Bug in toybox ls

Tristan Van Berkom tristan.vanberkom at codethink.co.uk
Sun Mar 6 22:58:53 PST 2016


Hi,

I ran into a problem building flex today, where the automake provided
mdate-sh script produced garbage output in doc/version.texi causing
make install to break.

I will not contend that it makes any sense at all for the automake
mdate-sh script to try to make a pretty date out of ls's output,
however it seems that it relies on the output of 'ls -L -l -d -n' to
produce day names and month names and the like.

The offending script can be found in upstream automake here:

  http://git.savannah.gnu.org/cgit/automake.git/tree/lib/mdate-sh

An excerpt from the script:

# Because of the dummy argument above, month is in $2.
#
# On a POSIX system, we should have
#
# $# = 5
# $1 = file size
# $2 = month
# $3 = day
# $4 = year or time
# $5 = filename
#
# On Darwin 7.7.0 and 7.6.0, we have
#
# $# = 4
# $1 = day
# $2 = month
# $3 = year or time
# $4 = filename

Toybox ls however produces an output without any day or month names,
containing dates only in 'YYYY-MM-DD' form.

Cheers,
    -Tristan


 1457333933.0


More information about the Toybox mailing list