aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile13
-rw-r--r--doc/man/exec-as.161
2 files changed, 72 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index a303d36..77466d0 100644
--- a/Makefile
+++ b/Makefile
@@ -72,10 +72,10 @@ obj/%.o: src/%.c
# Install rules
.PHONY: install
-install: install-base
+install: install-base install-man
.PHONY: install-all
-install-all: install-base
+install-all: install-base install-doc
.PHONY: install-base
install-base: install-command install-copyright
@@ -98,6 +98,14 @@ install-license:
install -dm755 -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)"
install -m644 LICENSE -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)"
+.PHONY: install-doc
+install-doc: install-man
+
+.PHONY: install-man
+install-man:
+ install -dm755 -- "$(DESTDIR)$(MAN1DIR)"
+ install -m644 doc/man/exec-as.1 -- "$(DESTDIR)$(MAN1DIR)/$(COMMAND).1"
+
# Uninstall rules
@@ -108,6 +116,7 @@ uninstall:
-rm -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)/COPYING"
-rm -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)/LICENSE"
-rmdir -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)"
+ -rm -- "$(DESTDIR)$(MAN1DIR)/$(COMMAND).1"
diff --git a/doc/man/exec-as.1 b/doc/man/exec-as.1
new file mode 100644
index 0000000..27c4481
--- /dev/null
+++ b/doc/man/exec-as.1
@@ -0,0 +1,61 @@
+.TH EXEC-AS 1 EXEC-AS
+.SH NAME
+exec-as - passphrase strength evaluator
+.SH SYNOPSIS
+.B exec-as
+.I FILE
+.I ARGV0
+.RI [ ARGV ]...
+.SH DESCRIPTION
+.B exec-as
+shall spawn the program
+.IR FILE ,
+using
+.BR execvp (3),
+using
+.I ARGV0
+as the value for
+.BR argv[0] ,
+and the following arguments for the following values in
+.BR argv .
+.SH NOTES
+At least two arguments is required. Since this is not
+a builtin function, it cannot be used as
+.BR exec (1)
+without arguments to set file descriptors.
+.PP
+Because this is not a builtin function, running this
+program would normally do an fork–exec rather than
+just an exec. To just perform an exec, you need to
+use
+.BR exec (1)
+too:
+.B exec exec-as
+.SH EXAMPLES
+.B exec-as bash -bash
+will run the first program in
+.B $PATH
+named
+.BR bash ,
+and set
+.B argv[0]
+to
+.B \-bash
+(making it a login shell.) You can add addition argument as needed.
+.SH "SEE ALSO"
+.BR exec (1),
+.BR exec (3)
+.SH AUTHORS
+Principal author, Mattias Andrée. See the COPYING file for the full
+list of authors.
+.SH LICENSE
+Copyright \(co 2015 Mattias Andrée
+.br
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
+.br
+This is free software: you are free to change and redistribute it.
+.br
+There is NO WARRANTY, to the extent permitted by law.
+.SH BUGS
+Please report bugs to https://github.com/maandree/exec-as/issues or to
+maandree@member.fsf.org