SCRIPTS=zpm zpm-install zpm-merge zpm-list zpm-preserve zpm-test zpm-log \
zpm-contents zpm-uninstall zpm-pathmod zpm-rmpackage zpm-newpackage \
zpm-pkg zpm-add zpm-pkgfile zpm-gc zpm-repo zpm-update zpm-confgit
-MANPAGES=$(addprefix doc/, zpm.8 zpm-list.8 zpm-contents.8 zpm-hash.8 zpm-quote.8)
+MANPAGES=zpm.8 $(addprefix doc/zpm-, list.8 contents.8 hash.8 quote.8 pathmod.8 )
COMPILED=$(ZPKGBIN)
PROGRAMS=$(SCRIPTS) $(COMPILED)
--- /dev/null
+.TH zpm-contents 8 2018-12-08 "ZPM 0.3"
+.SH NAME
+zpm-pathmod \- modify package file metadata
+.SH SYNOPSIS
+.B zpm pathmod
+[
+.BI -f " pkgfile"
+]
+[
+.B -g
+]
+[
+.I path action \fR...
+]
+[
+.BI \fB:\fIpkgid
+]
+.SH DESCRIPTION
+\fBzpm-pathmod\fR modifies package file metadata taking the specified
+action on each path. An action can be \fBdelete\fR which will
+delete the path from the package, \fIfield\fB=\fIvalue\fR which
+sets the value of the given field, or \fIfield\fR which will
+print the value of the given field.
+.PP
+The package being modified can be changed by prefixing an argument
+with ':', and the path being modified can be changed by prefixing
+and argument with a '+'.
+.PP
+Everything happens in a single transaction, so either all of
+the changes specified will take place, or none of them will.
+The actions will fail if a non-existent field is given.
+.SH OPTIONS
+.TP
+\-g
+take file paths as glob patterns
+.SH EXAMPLES
+.TP
+zpm pathmod foo /var/lib/foo delete
+delete the /var/lib/foo file from the foo package
+.TP
+zpm pathmod foo /var/lib/foo mode=2755
+set the mode of /var/lib/foo to 2755
+.TP
+zpm pathmod foo /var/lib/foo username
+print the username of the owner of the /var/lib/foo file
+.SH EXIT STATUS
+0 on success non zero on failure
+.SH FILES
+/var/lib/zpm/local.db
+.SH ENVIRONMENT
+ZPMDB
+.SH AUTHOR
+Nathan Wagner
+.SH SEE ALSO
+zpm(8)