Skip to content

Commit

Permalink
Merge branch 'freebsd/10-stable/master' into hardened/10-stable/master
Browse files Browse the repository at this point in the history
  • Loading branch information
opntr-auto committed Mar 28, 2016
2 parents 8d34bdd + 4030fbd commit 11d8a09
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
6 changes: 4 additions & 2 deletions share/mk/bsd.files.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ __<bsd.files.mk>__:

FILESGROUPS?= FILES

.for group in ${FILESGROUPS}
_FILESGROUPS= ${FILESGROUPS:C,[/*],_,g}

.for group in ${_FILESGROUPS}
buildfiles: ${${group}}
.endfor

all: buildfiles

.for group in ${FILESGROUPS}
.for group in ${_FILESGROUPS}
.if defined(${group}) && !empty(${group})
installfiles: installfiles-${group}

Expand Down
6 changes: 4 additions & 2 deletions share/mk/bsd.incs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@

INCSGROUPS?= INCS

_INCSGROUPS= ${INCSGROUPS:C,[/*],_,g}

.if !target(buildincludes)
.for group in ${INCSGROUPS}
.for group in ${_INCSGROUPS}
buildincludes: ${${group}}
.endfor
.endif

all: buildincludes

.if !target(installincludes)
.for group in ${INCSGROUPS}
.for group in ${_INCSGROUPS}
.if defined(${group}) && !empty(${group})

${group}OWN?= ${BINOWN}
Expand Down
12 changes: 9 additions & 3 deletions usr.bin/script/script.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ static int child;
static const char *fname;
static char *fmfname;
static int fflg, qflg, ttyflg;
static int usesleep, rawout;
static int usesleep, rawout, showexit;

static struct termios tt;

Expand Down Expand Up @@ -107,6 +107,7 @@ main(int argc, char *argv[])
flushtime = 30;
fm_fd = -1; /* Shut up stupid "may be used uninitialized" GCC
warning. (not needed w/clang) */
showexit = 0;

while ((ch = getopt(argc, argv, "adfkpqrt:")) != -1)
switch(ch) {
Expand Down Expand Up @@ -195,7 +196,8 @@ main(int argc, char *argv[])
(void)fprintf(fscript, "Script started on %s",
ctime(&tvec));
if (argv[0]) {
fprintf(fscript, "command: ");
showexit = 1;
fprintf(fscript, "Command: ");
for (k = 0 ; argv[k] ; ++k)
fprintf(fscript, "%s%s", k ? " " : "",
argv[k]);
Expand Down Expand Up @@ -355,9 +357,13 @@ done(int eno)
if (rawout)
record(fscript, NULL, 0, 'e');
if (!qflg) {
if (!rawout)
if (!rawout) {
if (showexit)
(void)fprintf(fscript, "\nCommand exit status:"
" %d", eno);
(void)fprintf(fscript,"\nScript done on %s",
ctime(&tvec));
}
(void)printf("\nScript done, output file is %s\n", fname);
if (fflg) {
(void)printf("Filemon done, output file is %s\n",
Expand Down

0 comments on commit 11d8a09

Please sign in to comment.