summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominic Hargreaves <dom@earth.li>2018-05-21 11:03:56 +0200
committerRaphaƫl Manfredi <Raphael_Manfredi@pobox.com>2018-05-21 11:03:56 +0200
commit94831e424ef8bb500cb1486bbe0b7f8bce41dc42 (patch)
tree579e3f75f0f21bd0fa66412362be8f885098ac4e
parentf8e6e03cbfcecfd577555326c0775b109eb894a8 (diff)
Fix some syntax errors (#16)
This fixes syntax errors in makedist, patbase, patcil, patclean, patcol, patdiff, patname, and patsnap.
-rwxr-xr-xbin/manilist.SH2
-rwxr-xr-xkit/makedist.SH12
-rw-r--r--pl/makedir.pl2
-rw-r--r--pl/rcsargs.pl4
4 files changed, 10 insertions, 10 deletions
diff --git a/bin/manilist.SH b/bin/manilist.SH
index 85c7b21..2e7ebf4 100755
--- a/bin/manilist.SH
+++ b/bin/manilist.SH
@@ -213,7 +213,7 @@ if ($opt_d) {
}
@manifest = sort @manifest;
-@files = sort @files if defined(@files);
+@files = sort @files if @files;
# Build up the %manifest array so that we quickly know whether a file is in the
# manifest or not.
diff --git a/kit/makedist.SH b/kit/makedist.SH
index f40d5c5..ccc9566 100755
--- a/kit/makedist.SH
+++ b/kit/makedist.SH
@@ -114,7 +114,7 @@ sub kitbuild {
$list = $list[$kitnum];
$kit = sprintf("$package.kit" . $sp,$kitnum);
print "*** Making $kit ***\n";
- open(KIT,">$curdir/$kit") || do fatal("Can't create $curdir/$kit: $!");
+ open(KIT,">$curdir/$kit") || &fatal("Can't create $curdir/$kit: $!");
&kitleader;
@@ -202,7 +202,7 @@ sub kitlists {
}
# Build a file PACKNOTES to reconstruct split files
- if (defined %Chopped) {
+ if (%Chopped) {
open(PACKNOTES, ">$PACKNOTES") || &fatal("Can't create PACKNOTES: $!");
foreach (keys %Chopped) {
print PACKNOTES <<EOC;
@@ -248,9 +248,9 @@ EOC
# Read manifest file and initialize the %comment array.
sub maniread {
- do fatal("You don't have a $NEWMANI file. Run manifake")
+ &fatal("You don't have a $NEWMANI file. Run manifake")
unless -f "$NEWMANI";
- open(NEWMANI,$NEWMANI) || do fatal("Can't read $NEWMANI: $!");
+ open(NEWMANI,$NEWMANI) || &fatal("Can't read $NEWMANI: $!");
while (<NEWMANI>) {
($key,$val) = split(' ',$_,1) unless ($key,$val) = /^(\S+)\s+(.*)/;
$comment{$key} = $val;
@@ -266,7 +266,7 @@ sub manimake {
# Add built packlist
$comment{$PACKLIST} = 'Which files came with which kits';
- open(PACKLIST, ">$PACKLIST") || do fatal("Can't create $PACKLIST: $!");
+ open(PACKLIST, ">$PACKLIST") || &fatal("Can't create $PACKLIST: $!");
print PACKLIST
"After all the $package kits are run you should have the following files:
@@ -321,7 +321,7 @@ case \$todo in
'')
echo \"You have run all your kits.\"
EOM
- if (defined %Chopped) { # Some splitting occurred
+ if (%Chopped) { # Some splitting occurred
print KIT <<EOM;
if test -f $PACKNOTES; then
sh $PACKNOTES
diff --git a/pl/makedir.pl b/pl/makedir.pl
index a358deb..37b9253 100644
--- a/pl/makedir.pl
+++ b/pl/makedir.pl
@@ -22,7 +22,7 @@ sub makedir {
local($dir) = $_;
if (!-d && $_ ne '') {
# Make dirname first
- do makedir($_) if s|(.*)/.*|\1|;
+ &makedir($_) if s|(.*)/.*|\1|;
mkdir($dir, 0700) if ! -d $dir;
}
}
diff --git a/pl/rcsargs.pl b/pl/rcsargs.pl
index 8fdeab1..09a7cd9 100644
--- a/pl/rcsargs.pl
+++ b/pl/rcsargs.pl
@@ -19,11 +19,11 @@ sub rcsargs {
while ($_ = shift(@_)) {
if ($_ =~ /^-/) {
$result .= $_ . ' ';
- } elsif ($#_ >= 0 && do equiv($_,$_[0])) {
+ } elsif ($#_ >= 0 && &equiv($_,$_[0])) {
$result .= $_ . ' ' . $_[0] . ' ';
shift(@_);
} else {
- $result .= $_ . ' ' . do other($_) . ' ';
+ $result .= $_ . ' ' . &other($_) . ' ';
}
}
$result;