Skip to content
Snippets Groups Projects
getversion.sh 241 B
Newer Older
  • Learn to ignore specific revisions
  • #!/bin/sh
    
    if [ $# -ne 1 ]; then
    	echo >&2 "Usage: getversion.sh <directory>"
    	exit 1
    fi
    
    cd "$1" || exit 1
    
    
    git --git-dir=.git describe --always --abbrev=7 --dirty=+ 2>/dev/null && exit 0
    
    echo unknown