summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitmodules3
-rwxr-xr-xbin/packinit.SH1
-rw-r--r--bin/packinit.man2
-rwxr-xr-xbin/perload2
m---------debian0
-rw-r--r--dist.man2
-rw-r--r--jmake/files/Jmake.rules10
-rw-r--r--mcon/U/nis.U12
-rwxr-xr-xpat/patcil.SH14
-rwxr-xr-xpat/patdiff.SH22
10 files changed, 46 insertions, 22 deletions
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..ad915e6
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "debian"]
+ path = debian
+ url = git://git.debian.org/~srivasta/debian/debian-dir.git
diff --git a/bin/packinit.SH b/bin/packinit.SH
index 478839d..b9151f8 100755
--- a/bin/packinit.SH
+++ b/bin/packinit.SH
@@ -16,6 +16,7 @@ case "$0" in
esac
echo "Extracting bin/packinit (with variable substitutions)"
cat >packinit <<!GROK!THIS!
+#! /usr/bin/perl
# feed this into perl
eval "exec perl -S \$0 \$*"
if \$running_under_some_shell;
diff --git a/bin/packinit.man b/bin/packinit.man
index 3b305f3..bfadfe4 100644
--- a/bin/packinit.man
+++ b/bin/packinit.man
@@ -145,4 +145,4 @@ Larry Wall <lwall@netlabs.com> (version 2.0)
.br
Raphael Manfredi <ram@hptnos02.grenoble.hp.com>
.SH "SEE ALSO"
-dist(1).
+dist(7).
diff --git a/bin/perload b/bin/perload
index 68be6c3..ae60d7c 100755
--- a/bin/perload
+++ b/bin/perload
@@ -1,4 +1,4 @@
-: # feed this into perl
+#! /usr/bin/perl
'/bin/true' && eval 'exec perl -S $0 "$@"'
if $running_under_some_shell;
'di';
diff --git a/debian b/debian
new file mode 160000
+Subproject e22f008fdd8999417a84cef64901b7b1cd9f89c
diff --git a/dist.man b/dist.man
index 91afd6a..da0e60e 100644
--- a/dist.man
+++ b/dist.man
@@ -42,7 +42,7 @@
.in -5
.fi
..
-.TH DIST 1 ram
+.TH DIST 7 ram
.SH NAME
dist \- introduction to dist
.SH DESCRIPTION
diff --git a/jmake/files/Jmake.rules b/jmake/files/Jmake.rules
index aa31421..232c633 100644
--- a/jmake/files/Jmake.rules
+++ b/jmake/files/Jmake.rules
@@ -489,7 +489,7 @@ local_deinstall.man:: @@\
*/
#define LinkFileList(step,list,dir,sub) @!\
step:: list @@\
- @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\
+ @case '${MFLAGS}' in *[i]*) set +e;; *) set -e;; esac; \ @@\
echo " cd" dir; cd dir; for i in list; do (set -x; $(LN) sub/$$i .); done
@@ -1145,7 +1145,7 @@ local_realclean:: @@\
*/
#define CommonSubdirsRule(dirs) @!\
subdirs: @@\
- @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ @@\
+ @case '${MFLAGS}' in *[ik]*) set +e;; *) set -e;; esac; \ @@\
for i in dirs ;\ @@\
do \ @@\
(cd $$i ; echo $(VERB) "in $(DIR)$$i..."; \ @@\
@@ -1159,7 +1159,7 @@ subdirs: @@\
*/
#define NamedTargetSubdirsRule(dirs,name,verb,flags) @!\
name:: @@\
- @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ @@\
+ @case '${MFLAGS}' in *[ik]*) set +e;; *) set -e;; esac; \ @@\
for i in dirs ;\ @@\
do \ @@\
(cd $$i ; echo verb "in $(DIR)$$i..."; \ @@\
@@ -1386,7 +1386,7 @@ MakeLintSubdirs(dirs,lintlib)
*/
#define MakeMakeSubdirs(target) @!\
target:: @@\
- @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ @@\
+ @case '${MFLAGS}' in *[ik]*) set +e;; *) set -e;; esac; \ @@\
for i in $(SUBDIRS);\ @@\
do \ @@\
echo "Making "target" in $(DIR)$$i..."; \ @@\
@@ -1405,7 +1405,7 @@ target:: @@\
*/
#define MakeMakefilesSH() @!\
Makefiles.SH:: Makefile.SH @@\
- @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ @@\
+ @case '${MFLAGS}' in *[ik]*) set +e;; *) set -e;; esac; \ @@\
for i in $(SUBDIRS);\ @@\
do \ @@\
case "$(DIR)$$i/" in \ @@\
diff --git a/mcon/U/nis.U b/mcon/U/nis.U
index 8ddbd7f..13e103a 100644
--- a/mcon/U/nis.U
+++ b/mcon/U/nis.U
@@ -165,4 +165,16 @@ case "$passcat" in
'') passcat=':'
$test -f /etc/passwd && passcat='cat /etc/passwd';;
esac
+case "$hostcat" in
+'') hostcat='cat /etc/hosts';;
+*) ;;
+esac
+case "$groupcat" in
+'') groupcat='cat /etc/group';;
+*) ;;
+esac
+case "$passcat" in
+'') passcat='cat /etc/passwd';;
+*) ;;
+esac
diff --git a/pat/patcil.SH b/pat/patcil.SH
index 535ab2d..7bdcbc7 100755
--- a/pat/patcil.SH
+++ b/pat/patcil.SH
@@ -61,6 +61,8 @@ $startperl
!GROK!THIS!
cat >>patcil <<'!NO!SUBS!'
+use File::Temp qw/ tempfile tempdir /;
+
$progname = &profile; # Read ~/.dist_profile
require 'getopts.pl';
&usage unless $#ARGV >= 0;
@@ -504,12 +506,12 @@ x Toggle patch# prefix.
sub edit {
local($text) = join("\n", @_);
- open(TMP,">/tmp/cil$$") || die "Can't create /tmp/cil$$";
- print TMP $text;
- close TMP;
- system $EDITOR, "/tmp/cil$$";
- $text = `cat /tmp/cil$$`;
- unlink "/tmp/cil$$";
+ my $tmp = File::Temp->new();
+ print $tmp $text;
+ close $tmp;
+ system $EDITOR, "$tmp";
+ $text = `cat "$tmp"`;
+ unlink "$tmp";
$text;
}
diff --git a/pat/patdiff.SH b/pat/patdiff.SH
index ce00f94..e2e78f7 100755
--- a/pat/patdiff.SH
+++ b/pat/patdiff.SH
@@ -49,6 +49,8 @@ $startperl
!GROK!THIS!
cat >>patdiff <<'!NO!SUBS!'
+use File::Temp qw/ tempfile tempdir /;
+
$RCSEXT = ',v' unless $RCSEXT;
$TOPDIR = ''; # We are at top-level directory
@@ -159,9 +161,11 @@ foreach $file (@ARGV) {
close DIFF;
system 'rcs', "-Nlastpat:$new", @files;
} else {
- &copyright'expand("co -p -rlastpat $file", "/tmp/pdo$$");
- &copyright'expand("co -p -r$new $file", "/tmp/pdn$$");
- open(DIFF, "$mydiff /tmp/pdo$$ /tmp/pdn$$ |") ||
+ my $tmpo = File::Temp->new();
+ my $tmpn = File::Temp->new();
+ &copyright'expand("co -p -rlastpat $file", "$tmpo");
+ &copyright'expand("co -p -r$new $file", "$tmpn");
+ open(DIFF, "$mydiff $tmpo $tmpn |") ||
die "Can't run $mydiff";
while (<DIFF>) { # Contextual or unified diff
if ($. == 1) {
@@ -177,7 +181,7 @@ foreach $file (@ARGV) {
}
close DIFF;
system 'rcs', "-Nlastpat:$new", @files;
- unlink "/tmp/pdn$$", "/tmp/pdo$$";
+ unlink "$tmpo", "$tmpn";
}
} else {
if ($mydiff eq '') {
@@ -191,9 +195,11 @@ foreach $file (@ARGV) {
}
close DIFF;
} else {
- system "co -p -rlastpat $files >/tmp/pdo$$";
- system "cp $file /tmp/pdn$$";
- open(DIFF, "$mydiff /tmp/pdo$$ /tmp/pdn$$ |") ||
+ my $tmpo = File::Temp->new();
+ my $tmpn = File::Temp->new();
+ system "co -p -rlastpat $files >$tmpo";
+ system "cp $file $tmpn";
+ open(DIFF, "$mydiff $tmpo $tmpn |") ||
die "$progname: can't fork $mydiff: $!\n";
while (<DIFF>) {
# Contextual or unified diff
@@ -209,7 +215,7 @@ foreach $file (@ARGV) {
print PATCH;
}
close DIFF;
- unlink "/tmp/pdn$$", "/tmp/pdo$$";
+ unlink "$tmpo", "$tmpn";
}
}
}