You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/sys-devel/bc/files/bc-1.07.1-no-ed-its-sed.patch

24 lines
441 B

in Gentoo, everyone has sed. no one really has ed. tweak this minor script
to use sed instead of ed. the changes are straight forward:
* change \$ to $
* merge last two $,$ commands into one
* delete w/q commands
--- a/bc/fix-libmath_h
+++ b/bc/fix-libmath_h
@@ -1,9 +1,6 @@
-ed libmath.h <<EOS-EOS
+sed -i libmath.h -e '
1,1s/^/{"/
-1,\$s/\$/",/
-2,\$s/^/"/
-\$,\$d
-\$,\$s/,\$/,0}/
-w
-q
-EOS-EOS
+1,$s/$/",/
+2,$s/^/"/
+$s/.*/0}/
+'