chain.c32: new "hide" option
[syslinux.git] / gen-id.sh
blob02be21a4a397e89cc64040b3a922219ed27c683c
1 #!/bin/sh
3 # Create a 10-character ID for this build. If we're using a git tree,
4 # generate an ID of the form g[-*]XXXXXXXX (* = modified); otherwise use
5 # the passed-in timestamp.
8 if test -n "$GIT_DIR" -o -d ../.git -o -f ../.git; then
9 ver="$(git rev-parse HEAD | cut -c1-8)"
10 if test -n "$ver"; then
11 if test -n "$(git diff-index --name-only HEAD)"; then
12 ver='g*'"$ver"
13 else
14 ver='g-'"$ver"
18 if test -z "$ver"; then
19 echo "$1"
20 else
21 echo "$ver"