aboutsummaryrefslogtreecommitdiff
path: root/core/runit/build
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2020-05-23 17:23:10 +0300
committerCem Keylan <cem@ckyln.com>2020-05-23 17:23:10 +0300
commitf551ac677063f2ce5291bcb01ef8ea276c9980e8 (patch)
treed35aca7c2679deb07fbb703557f8ff96a33b3b84 /core/runit/build
parenta902593b864d0de16b160718f0050190dced2c46 (diff)
downloadrepository-f551ac677063f2ce5291bcb01ef8ea276c9980e8.tar.gz
runit: POSIX sed
Diffstat (limited to 'core/runit/build')
-rwxr-xr-xcore/runit/build10
1 files changed, 8 insertions, 2 deletions
diff --git a/core/runit/build b/core/runit/build
index 2176daa1..852e37c6 100755
--- a/core/runit/build
+++ b/core/runit/build
@@ -1,5 +1,11 @@
#!/bin/sh -e
+sed_i() {
+ for file; do :; done
+ sed "$@" > _
+ cat _ > "$file"; rm -f _
+}
+
read -r version _ < "${0%/*}/version"
for patch in ./*.patch ; do
@@ -11,10 +17,10 @@ cd "runit-$version"
(
cd src
- sed 's@sbin/runit@usr/bin/runit@g' -i runit.h
+ sed_i 's@sbin/runit@usr/bin/runit@g' runit.h
printf '%s -D_GNU_SOURCE -static\n' "${CC-cc}" "$CFLAGS" > conf-cc
printf '%s %s -static -Wl,-z -Wl,noexecstack\n' "${CC-cc}" "$CFLAGS" > conf-ld
- sed -i 's:^char \*varservice ="/service/";$:char \*varservice ="/var/service/";:' sv.c
+ sed_i 's:^char \*varservice ="/service/";$:char \*varservice ="/var/service/";:' sv.c
make