mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-01-31 00:23:56 +00:00
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.
This commit is contained in:
parent
e6f4c47c21
commit
f65b10457b
@ -192,7 +192,7 @@ CT_Which() {
|
||||
# to the highest entire second
|
||||
# Usage: CT_DoDate <fmt>
|
||||
CT_DoDate() {
|
||||
date "$1" |sed -r -e 's/%N$/000000000/;'
|
||||
date "$1" |sed -r -e 's/N$/000000000/;'
|
||||
}
|
||||
|
||||
CT_STEP_COUNT=1
|
||||
|
Loading…
x
Reference in New Issue
Block a user