aboutsummaryrefslogtreecommitdiff
path: root/core/mandoc
diff options
context:
space:
mode:
Diffstat (limited to 'core/mandoc')
-rwxr-xr-xcore/mandoc/build12
1 files changed, 9 insertions, 3 deletions
diff --git a/core/mandoc/build b/core/mandoc/build
index c8b0167b..b241e953 100755
--- a/core/mandoc/build
+++ b/core/mandoc/build
@@ -1,8 +1,14 @@
#!/bin/sh -e
-sed -i '/int dummy/d' compat_err.c
-sed -i 's,"more -s","less",g' main.c
-sed -i "s/CC=.*/CC='$CC'/" configure
+sed_i() {
+ for file; do :; done
+ sed "$@" > _
+ cat _ > "$file"; rm -f _
+}
+
+sed_i '/int dummy/d' compat_err.c
+sed_i 's,"more -s","less",g' main.c
+sed_i "s/CC=.*/CC='$CC'/" configure
cat > configure.local <<EOF
PREFIX=/usr