Add Makefile to update version information.
authorOlof-Joachim Frahm <olof@macrolet.net>
Thu, 8 Jan 2015 14:22:59 +0000 (14:22 +0000)
committerOlof-Joachim Frahm <olof@macrolet.net>
Thu, 8 Jan 2015 14:24:06 +0000 (14:24 +0000)
At the moment that is current version, commit ID and branch.

Also ignore the build directory.

.gitignore [new file with mode: 0644]
Makefile [new file with mode: 0644]
README.md [new file with mode: 0644]
crypto-install.py

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..c795b05
--- /dev/null
@@ -0,0 +1 @@
+build
\ No newline at end of file
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..676a09d
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,9 @@
+all: build
+       @sed \
+               -e "s/GIT-TAG/`git describe --abbrev=0 --tags`/g" \
+               -e "s/GIT-COMMIT/`git rev-parse --short=7 HEAD`/g" \
+               -e "s/GIT-BRANCH/`git rev-parse --abbrev-ref HEAD`/g" \
+               crypto-install.py > build/crypto_install.py
+
+build:
+       mkdir build
diff --git a/README.md b/README.md
new file mode 100644 (file)
index 0000000..b44b229
--- /dev/null
+++ b/README.md
@@ -0,0 +1,6 @@
+crypto-install.py
+
+# USAGE
+
+Run the script to install a baseline setup.  Existing files are detected
+and not touched in the process, so running it is always safe to do.
index 2e3b926..0aff602 100755 (executable)
@@ -6,7 +6,7 @@ import argparse, ConfigParser, os, sys, textwrap
 
 
 def print_version ():
-    print ("crypto-install.py GIT-TAG (GIT-REVISION)")
+    print ("crypto-install.py GIT-TAG (GIT-COMMIT/GIT-BRANCH)")
 
 
 def input_string (prompt=""):