main: olsr_create_lock_file: fix return value check on 'open' call
[olsrd.git] / make / hash_source.sh
1 #!/bin/sh
2
3 sha="`git log -1 --pretty=%h 2> /dev/null`"
4 if [ -z "$sha" ]; then
5   sha="0000000"
6 fi
7 echo -n "-git_$sha"
8
9 md5cmd=md5sum
10 os=$(uname)
11 if [ "xDarwin" = "x$os" ] ; then
12   md5cmd=md5
13 fi
14 echo -n "-hash_"
15 cat `find . -name *.[ch] | grep -v -E '[/\\]?builddata.c$'`| $md5cmd | awk '{ print $1; }'