scripts/getver.sh: allow conversion between git hash and revision
authorJonas Gorski <jonas.gorski@gmail.com>
Sun, 5 Jun 2016 18:45:25 +0000 (20:45 +0200)
committerJonas Gorski <jonas.gorski@gmail.com>
Sat, 9 Jul 2016 11:41:28 +0000 (13:41 +0200)
commit1001b5d77c5dd7adc7bb2fcce8778364b88e5ea0
tree93eda923c062a7dad69ba5e1b51256c0b786326d
parent575be9d18259560b40039ee0e4bf6d6ce109fca6
scripts/getver.sh: allow conversion between git hash and revision

Add code allowing easy conversion between git commit ids and revisions.

Example:

$ ./scripts/getver.sh
r792
$ ./scripts/getver.sh r123
b7fc892eb56b52d25bc00578af9d1ee058dcf6b3
$ ./scrpts/getver.sh b7fc892eb56b52d25bc00578af9d1ee058dcf6b3
r123

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
scripts/getver.sh