summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-06-23 16:14:23 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-06-23 16:22:15 (EDT)
commit67882fb797024325e570ab7fa27ce248f6660af8 (patch)
tree67e43723f65a5fa1ed3c968597a9c79c443869e1
parentb73141d5e71aa89962e12bbeba2255d8296bb8d5 (diff)
patches/01_convert_ed_to_sed.patch: New patch
-rw-r--r--patches/01_convert_ed_to_sed.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/patches/01_convert_ed_to_sed.patch b/patches/01_convert_ed_to_sed.patch
new file mode 100644
index 0000000..87d192c
--- /dev/null
+++ b/patches/01_convert_ed_to_sed.patch
@@ -0,0 +1,31 @@
+Author: Patrick McDermott <patrick.mcdermott@libiquity.com>
+Subject: Convert bc/fix-libmath_h to use sed
+
+BusyBox ed bails on these commands:
+
+ "libmath.h", 47 lines, 2655 chars
+ : ed: no substitutions found for "^"
+ : ed: no substitutions found for "$"
+ : : : ed: no substitutions found for ",$"
+ : "libmath.h", 46 lines, 2652 chars
+ : Really quit?
+
+diff -Naurp src.orig/bc/fix-libmath_h src/bc/fix-libmath_h
+--- src.orig/bc/fix-libmath_h 2017-04-07 18:20:02.000000000 -0400
++++ src/bc/fix-libmath_h 2019-06-23 15:43:12.264276574 -0400
+@@ -1,9 +1,7 @@
+-ed libmath.h <<EOS-EOS
++mv libmath.h libmath.h.orig
++sed '
+ 1,1s/^/{"/
+-1,\$s/\$/",/
+-2,\$s/^/"/
+-\$,\$d
+-\$,\$s/,\$/,0}/
+-w
+-q
+-EOS-EOS
++1,$s/$/",/
++2,$s/^/"/
++$,$s/^.*$/0}/
++' libmath.h.orig >libmath.h