From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 17357 invoked from network); 19 Sep 2021 12:16:06 -0000 Received: from bsd.lv (HELO mandoc.bsd.lv) (66.111.2.12) by inbox.vuxu.org with ESMTPUTF8; 19 Sep 2021 12:16:06 -0000 Received: from fantadrom.bsd.lv (localhost [127.0.0.1]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id ecf0b38d for ; Sun, 19 Sep 2021 07:16:04 -0500 (EST) Received: from localhost (mandoc.bsd.lv [local]) by mandoc.bsd.lv (OpenSMTPD) with ESMTPA id 8bb86679 for ; Sun, 19 Sep 2021 07:16:04 -0500 (EST) Date: Sun, 19 Sep 2021 07:16:04 -0500 (EST) X-Mailinglist: mandoc-source Reply-To: source@mandoc.bsd.lv MIME-Version: 1.0 From: schwarze@mandoc.bsd.lv To: source@mandoc.bsd.lv Subject: mandoc: do not use the sed(1) -i option, it is not portable; issue found X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Message-ID: Log Message: ----------- do not use the sed(1) -i option, it is not portable; issue found on Oracle Solaris 11 Modified Files: -------------- mandoc/regress: regress.pl Revision Data ------------- Index: regress.pl =================================================================== RCS file: /home/cvs/mandoc/mandoc/regress/regress.pl,v retrieving revision 1.15 retrieving revision 1.16 diff -Lregress/regress.pl -Lregress/regress.pl -u -p -r1.15 -r1.16 --- regress/regress.pl +++ regress/regress.pl @@ -2,7 +2,7 @@ # # $Id$ # -# Copyright (c) 2017, 2018, 2019, 2020 Ingo Schwarze +# Copyright (c) 2017,2018,2019,2020,2021 Ingo Schwarze # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -261,6 +261,7 @@ for my $test (@regress_tests) { my $o = "$test->{NAME}.mandoc_ascii"; my $w = "$test->{NAME}.out_ascii"; my $to = "$test->{NAME}.mandoc_tag"; + my $tos = "$test->{NAME}.mandoc_tag_s"; my $tw = "$test->{NAME}.out_tag"; my $diff_ascii; if ($targets{tag} && $tag_tests{$test->{NAME}} && @@ -273,8 +274,8 @@ for my $test (@regress_tests) { print "@cmd\n" if $targets{verbose}; system @cmd and fail $test->{NAME}, 'tag:man'; - system qw(sed -i), 's/ .*\// /', $to; - system @diff, $tw, $to + system "sed 's: .*/: :' $to > $tos"; + system @diff, $tw, $tos and fail $test->{NAME}, 'tag:diff'; print "." unless $targets{verbose}; $diff_ascii = $targets{ascii}; @@ -309,8 +310,8 @@ for my $test (@regress_tests) { print "." unless $targets{verbose}; } if ($targets{clean}) { - print "rm $o $to $m $mo\n" if $targets{verbose}; - $count_rm += unlink $o, $to, $m, $mo; + print "rm $o $to $tos $m $mo\n" if $targets{verbose}; + $count_rm += unlink $o, $to, $tos, $m, $mo; } } if ($targets{ascii} || $targets{tag} || $targets{man}) { -- To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv