From 0ee1882f0d6405481e99cf7d63cfd35e71af0fb6 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sat, 13 Jun 2020 11:35:49 -0400 Subject: tools/mtime.sh: Fix ls parsing The file name (preceeded by whitespace) ended up in the year variable, which isn't quoted when later used as a numeric argument to printf. --- diff --git a/NEWS b/NEWS index 6710d47..a0bed97 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,8 @@ libopkbuild: * ob_get_source_parameter() now supports a "Format" field to get the source package formate version. + * The modification time in manual pages is now parsed and formatted + correctly. opkbuild version 4.1.4 ---------------------- diff --git a/tools/mtime.sh b/tools/mtime.sh index 7207f9e..b88b833 100755 --- a/tools/mtime.sh +++ b/tools/mtime.sh @@ -31,10 +31,11 @@ get_mtime() local m= local d= local y= + local name= local now_m= local now_y= - read -r mode links owner group size m d y <<-EOF + read -r mode links owner group size m d y name <<-EOF $(LC_ALL=POSIX ls -l "${file}") EOF case "${m}" in -- cgit v0.9.1