summaryrefslogtreecommitdiff
path: root/pkgrel.1
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2024-01-06 02:42:16 +0100
committerAki <please@ignore.pl>2024-01-06 02:44:00 +0100
commit080d76ce2cbe6883941b01fb46b5dbee3b0d72c9 (patch)
tree38307579a10814abc4b8a87f489397f3c3631d55 /pkgrel.1
parent0a31e19167dc89a0d651a5aeab4ccbabde5d7369 (diff)
downloadpkgrel-080d76ce2cbe6883941b01fb46b5dbee3b0d72c9.zip
pkgrel-080d76ce2cbe6883941b01fb46b5dbee3b0d72c9.tar.gz
pkgrel-080d76ce2cbe6883941b01fb46b5dbee3b0d72c9.tar.bz2
Added prefix and -d option
Diffstat (limited to 'pkgrel.1')
-rw-r--r--pkgrel.126
1 files changed, 22 insertions, 4 deletions
diff --git a/pkgrel.1 b/pkgrel.1
index a292d83..5d1965d 100644
--- a/pkgrel.1
+++ b/pkgrel.1
@@ -1,9 +1,12 @@
-.TH pkgrel 1 "2022-07-08"
+.TH pkgrel 1 "2024-01-06"
.SH NAME
pkgrel \- print out pkgrel number according to git repository history
.SH SYNOPSIS
-.SY pkgrel
-.YS
+.B pkgrel
+.RI [ prefix ]
+.br
+.B pkgrel
+.RB [ \-d ]
.SH DESCRIPTION
This program will check the history of the
.I PKGBUILD
@@ -13,6 +16,19 @@ The pkgrel is guessed based on the state of the working directory, index, and hi
until the end of history. The pkgrel starts at 1. If pkgver is changed, the currently stored pkgrel is printed to
standard output and the program exits. If the working directory, index or a commit contains any other changes that are
not affecting pkgver value, then pkgrel is incremented and the program continues.
+.PP
+.I Prefix
+and
+.B \-d
+allow to specify text that will be prepended to the output. With
+.I prefix
+as argument user can prepend any value before the regular output.
+.B \-d
+option sets
+.I prefix
+to a handy constant
+.BR pkgrel=
+making the final output take a form of a shell variable assignment.
.SH EXIT STATUS
0 will be returned on successful run and the pkgrel number will be printed to standard output.
.PP
@@ -32,4 +48,6 @@ This program was implemented as a result of a simple experiment to see if it wou
pkgrel inside the git repository. The reason to avoid it was to disconnect meta information related to versioning from
the content of the version-controlled files.
.SH SEE ALSO
-.BR PKGBUILD (5),\ makepkg (8),\ git (1)
+.BR PKGBUILD (5),
+.BR makepkg (8),
+.BR git (1)