From: Wayne Davison Date: Mon, 15 Jun 2020 22:08:42 +0000 (-0700) Subject: Avoid -e option to sed for BSD. X-Git-Tag: v3.2.0pre3~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=353dec11024d1b1d762c0d197fd267fed36741bf;p=thirdparty%2Frsync.git Avoid -e option to sed for BSD. --- diff --git a/help-from-md b/help-from-md index 21f49cd2..a5b61577 100755 --- a/help-from-md +++ b/help-from-md @@ -10,13 +10,12 @@ helpfile="$2" newfile="$helpfile.new" findfile="${helpfile/./\\.}" -sed -e '1,/^\[comment\].*'"$findfile"'/d' \ - -e '1,/^```/d' \ - -e '/^```/,$d' \ - -e 's/"/\\"/g' \ - -e 's/^/ rprintf(F,"/' \ - -e 's/$/\\n");/' \ - <"$mdfile" >"$newfile" +sed '1,/^\[comment\].*'"$findfile"'/d' <"$mdfile" | \ + sed '1,/^```/d' | \ + sed '/^```/,$d' | \ + sed 's/"/\\"/g' | \ + sed 's/^/ rprintf(F,"/' | \ + sed 's/$/\\n");/' >"$newfile" if [[ ! -s "$newfile" ]]; then rm "$newfile"