Trying to build libiconv library under msys environment, I've got sed related errors:
sed: -e expression #2, char 32: Extra characters after command
Fortunately, I've found a solution in the internet:
diff -ur tmp/libiconv-1.12/windows/windres-options src/libiconv-1.12/windows/windres-options
--- tmp/libiconv-1.12/windows/windres-options 2007-05-27 19:42:10 +0100
+++ src/libiconv-1.12/windows/windres-options 2008-05-28 13:41:03 +0100
@@ -14,20 +14,29 @@
fi
version="$1" # something like 2.0 or 2.17 or 2.17.3 or 2.17.3-pre3
-sed_extract_major='/^[0-9]/{s/^([0-9]*).*/1/p;q}
+sed_extract_major='
+/^[0-9]/{
+ s/^([0-9]*).*/1/p
+ q
+}
a
0
-q
'
-sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]([0-9]*).*/1/p;q}
+sed_extract_minor='
+/^[0-9][0-9]*[.][0-9]/{
+ s/^[0-9]*[.]([0-9]*).*/1/p
+ q
+}
a
0
-q
'
-sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]([0-9]*).*/1/p;q}
+sed_extract_subminor='
+/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{
+ s/^[0-9]*[.][0-9]*[.]([0-9]*).*/1/p
+ q
+}
a
0
-q
'
{
Credit goes to Keith Marshall.
No comments:
Post a Comment