summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-08-04 18:49:46 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-08-04 18:49:46 (EDT)
commit130a92cc5808a21fb4262a00fc585e74d65c08af (patch)
treefb9c698e94ff3640926f9a9a9273a6e8253d239c
parentf77c905036dd756fbdfaa85fa446fa32e31a054c (diff)
ob-buildopk: Fix touch -d check
-rw-r--r--NEWS7
-rw-r--r--src/ob-buildopk.sh10
2 files changed, 14 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index fa74584..f665a07 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,13 @@ opkbuild version 4.1.3+dev
Released: ????-??-??
+The "this time it'll work" release.
+
+Utilities:
+
+ * ob-buildopk now correctly checks for the "touch" utility's "-h"
+ option. Apologies for the noise.
+
opkbuild version 4.1.3
----------------------
diff --git a/src/ob-buildopk.sh b/src/ob-buildopk.sh
index 5dd7917..598419f 100644
--- a/src/ob-buildopk.sh
+++ b/src/ob-buildopk.sh
@@ -41,9 +41,13 @@ build_opk()
# Also, we want to set the mtimes of the links themselves, if possible.
rm -f '.opkbuild/touch-noderef.none' '.opkbuild/touch-noderef.link'
ln -s '.opkbuild/touch-noderef.none' '.opkbuild/touch-noderef.link'
- ${TOUCH} -h '.opkbuild/touch-noderef.link' 1>/dev/null 2>/dev/null || :
- if ! test -f '.opkbuild/touch-noderef.none'; then
- find_not_link='' touch_noderef='-h'
+ if ${TOUCH} -h '.opkbuild/touch-noderef.link' 1>/dev/null 2>/dev/null
+ then
+ if test -f '.opkbuild/touch-noderef.none'; then
+ find_not_link='! -type l' touch_noderef=''
+ else
+ find_not_link='' touch_noderef='-h'
+ fi
else
find_not_link='! -type l' touch_noderef=''
fi