scripts/functions: fix date munging when ns are not available
authorTitus von Boxberg <tvb377@gmx.de>
Wed Feb 03 00:24:24 2010 +0100 (2010-02-03)
changeset 17987051d758475a
parent 1797 42c618ca576e
child 1799 226c8f5861e5
scripts/functions: fix date munging when ns are not available

On some systems (eg. *BSD and Darwin), date does not support nanoseconds
(%N) precision. Instead of printing '%N' in this case, it just prints 'N'.
Fix the sed expression to handle this case.
scripts/functions
     1.1 --- a/scripts/functions	Wed Feb 03 00:24:24 2010 +0100
     1.2 +++ b/scripts/functions	Wed Feb 03 00:24:24 2010 +0100
     1.3 @@ -192,7 +192,7 @@
     1.4  # to the highest entire second
     1.5  # Usage: CT_DoDate <fmt>
     1.6  CT_DoDate() {
     1.7 -    date "$1" |sed -r -e 's/%N$/000000000/;'
     1.8 +    date "$1" |sed -r -e 's/N$/000000000/;'
     1.9  }
    1.10  
    1.11  CT_STEP_COUNT=1