drivers/uart: Replace 'unsigned long int' by 'unsigned long'
[coreboot2.git] / util / intelp2m / scripts / linux / version.sh
blob565063a04b5d796c03b3607f277b8aee97a65b41
1 #!/usr/bin/env sh
3 SCRIPTS_DIR=$(cd "$(dirname "$0")" && pwd)
4 PROJECT_DIR="${SCRIPTS_DIR}/../.."
6 VERSION=$(cat ${PROJECT_DIR}/version.txt)
7 LAST_COMMIT=$(git log --oneline -n 1 --pretty=format:%h ${PROJECT_DIR})
8 DIFF=$(git diff ${PROJECT_DIR})
10 if [ -z "$DIFF" ]; then
11 echo "${VERSION}-${LAST_COMMIT}"
12 else
13 echo "${VERSION}-${LAST_COMMIT}-dirty"