summaryrefslogtreecommitdiff
blob: ce8e456186b77ffd5970eb762c4e52b364de3d9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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}/
+'