mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-03-03 21:45:51 +08:00
Cygwin: mkvers: fix a bug in sed statement
While reformatting the script, backticks `` were replaced with brackets $(). This in turn invalidated the \\( ... \\) expressions in the sed script because backslash resolution in $() works differently from backslash resolution in ``. Only a single backslash is valid now. While at it, fix up the uname(2) date representation when building a snapshot. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
2b72887ac8
commit
5b4de1c915
@ -140,7 +140,8 @@ done | tee /tmp/mkvers.$$ 1>&9
|
|||||||
trap "rm -f /tmp/mkvers.$$" 0 1 2 15
|
trap "rm -f /tmp/mkvers.$$" 0 1 2 15
|
||||||
|
|
||||||
if [ -n "$snapshotdate" ]; then
|
if [ -n "$snapshotdate" ]; then
|
||||||
usedate="$(echo $snapshotdate | sed 's/-\\(..:..[^-]*\\).*$/ \1SNP/')"
|
usedate="$(echo $snapshotdate \
|
||||||
|
| sed -e 's/\(....\)\(..\)\(..\)-\(..:..\).*$/\1-\2-\3 \4SNP/')"
|
||||||
else
|
else
|
||||||
usedate="$builddate"
|
usedate="$builddate"
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user