aboutsummaryrefslogtreecommitdiff
path: root/src/cachehandler.cpp
diff options
context:
space:
mode:
authorlinear <dev@linear.network>2021-09-05 00:34:07 -0700
committerFelix Queißner <felix@ib-queissner.de>2021-09-05 11:04:54 +0200
commit2cdf23f692ae9050f1f109162aeac82d37643748 (patch)
tree59bcba3f387dd2ae928fecdaae304c48e5826423 /src/cachehandler.cpp
parente07c8eb599c9fc0f77c7a6f0643a786b751796b4 (diff)
doc/gen-man.sh: make sed command portable
usage of the "-i" feature of sed is not entirely portable across different operating systems. -i has an optional extension to save a backup of the edited file, and different systems parse this option in a different manner. the sed in GNU, busybox, NetBSD, and OpenBSD expects the argument to be immediately after, like `-i.bak`, if it is present. the sed in macOS and FreeBSD expects the argument to follow after a space, like `-i .bak`, but will accept the `-i.bak` form as well. the issue is that when no backup is specified, the first requires just `-i`, where the second requires `-i ''`. the easiest way around this is to just add a backup, which is what i chose to do here. i also added the .bak extension to the .gitignore. additionally, all aforementioned seds except for GNU require the file to be the final argument, and will not accept it between other options.
Diffstat (limited to 'src/cachehandler.cpp')
0 files changed, 0 insertions, 0 deletions