aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-11-01 09:32:16 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-11-01 09:33:43 +1300
commite4a625c8526e26d8e7cbb9521c6f3b6e88a27475 (patch)
treeef35c22c298fb51e3bcc6e6cfb6c8b51a5421ec4
parentc01617716dd04c04b6bd7cf34fa0407264d94b7c (diff)
downloaddotfiles-e4a625c8526e26d8e7cbb9521c6f3b6e88a27475.tar.gz
dotfiles-e4a625c8526e26d8e7cbb9521c6f3b6e88a27475.zip
Add dfv(1df) version-printing tool
This is mostly just for fun, but could be handy later on when I'm playing with distributed or automated deployments of tagged and verified releases. Like a few of the other shell scripts, this is built by abusing my mi5(1df) wrapper to get static details baked into the shell script that are only known at runtime.
-rw-r--r--.gitignore3
-rw-r--r--Makefile4
-rw-r--r--bin/dfv.mi58
-rw-r--r--man/man1/dfv.1df12
4 files changed, 27 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index deccfe5e..6d07e894 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,6 +21,9 @@ bin/csmw
bin/d2u
bin/dam
bin/ddup
+bin/dfv
+bin/dfv.sh
+bin/dfv.m4
bin/dmp
bin/dub
bin/edda
diff --git a/Makefile b/Makefile
index 5b316294..6440b805 100644
--- a/Makefile
+++ b/Makefile
@@ -98,6 +98,7 @@ BINS = bin/ap \
bin/dam \
bin/d2u \
bin/ddup \
+ bin/dfv \
bin/dmp \
bin/dub \
bin/edda \
@@ -207,6 +208,7 @@ BINS = bin/ap \
bin/xrq
BINS_M4 = bin/chn.m4 \
+ bin/dfv.m4 \
bin/edda.m4 \
bin/oii.m4 \
bin/pst.m4 \
@@ -216,6 +218,7 @@ BINS_M4 = bin/chn.m4 \
bin/urlc.m4
BINS_SH = bin/chn.sh \
+ bin/dfv.sh \
bin/edda.sh \
bin/oii.sh \
bin/pst.sh \
@@ -283,6 +286,7 @@ clean distclean:
m4 < $< > $@
bin/chn.sh: bin/chn.m4 include/mktd.m4
+bin/dfv.sh: bin/dfv.m4 include/mktd.m4
bin/edda.sh: bin/edda.m4 include/mktd.m4
bin/oii.sh: bin/oii.m4 include/mktd.m4
bin/pst.sh: bin/pst.m4 include/mktd.m4
diff --git a/bin/dfv.mi5 b/bin/dfv.mi5
new file mode 100644
index 00000000..02f1721d
--- /dev/null
+++ b/bin/dfv.mi5
@@ -0,0 +1,8 @@
+# Print dotfiles version information
+cat <<'EOF'
+<%
+ include(VERSION)
+ syscmd(`printf "Built on %s by %s@%s\n" "$(date)" "$(id -nu)" "$(uname -n)"')
+%>
+The next 1<<10 years are ours!
+EOF
diff --git a/man/man1/dfv.1df b/man/man1/dfv.1df
new file mode 100644
index 00000000..b3274d44
--- /dev/null
+++ b/man/man1/dfv.1df
@@ -0,0 +1,12 @@
+.TH DFV 1df "November 2017" "Manual page for dfv"
+.SH NAME
+.B dfv
+\- print dotfiles distribution version information
+.SH SYNOPSIS
+.B dfv
+.SH DESCRIPTION
+.B dfv
+prints some version information about the dotfiles distribution installed,
+including some details about the date the tool itself was built.
+.SH AUTHOR
+Tom Ryder <tom@sanctum.geek.nz>