summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2020-06-13 11:35:49 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2020-06-13 11:40:01 (EDT)
commit0ee1882f0d6405481e99cf7d63cfd35e71af0fb6 (patch)
treeb899bc086dfd916ec0cd76baece168d078add3e2
parent445e3d6e43c55ddeb19322918e016c63f91c1958 (diff)
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.
-rw-r--r--NEWS2
-rwxr-xr-xtools/mtime.sh3
2 files changed, 4 insertions, 1 deletions
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