aboutsummaryrefslogtreecommitdiff
path: root/core/mandoc
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2020-05-23 17:25:50 +0300
committerCem Keylan <cem@ckyln.com>2020-05-23 17:25:50 +0300
commitd9986c90f36593e8b8b446a91357da349431c51e (patch)
tree083a996f3b215db10b52b30415f386feb5e76036 /core/mandoc
parent1abc38d6f5d72d7bf263f0015d943c70a904be8a (diff)
downloadrepository-d9986c90f36593e8b8b446a91357da349431c51e.tar.gz
mandoc: POSIX sed
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