diff options
author | Cem Keylan <cem@ckyln.com> | 2020-05-23 17:23:10 +0300 |
---|---|---|
committer | Cem Keylan <cem@ckyln.com> | 2020-05-23 17:23:10 +0300 |
commit | f551ac677063f2ce5291bcb01ef8ea276c9980e8 (patch) | |
tree | d35aca7c2679deb07fbb703557f8ff96a33b3b84 | |
parent | a902593b864d0de16b160718f0050190dced2c46 (diff) | |
download | repository-f551ac677063f2ce5291bcb01ef8ea276c9980e8.tar.gz |
runit: POSIX sed
-rwxr-xr-x | core/runit/build | 10 |
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 |