mirror of
https://github.com/gozfree/gear-lib.git
synced 2026-02-07 12:19:15 +08:00
28 lines
502 B
Bash
Executable File
28 lines
502 B
Bash
Executable File
#!/bin/sh
|
|
major=0
|
|
minor=1
|
|
patch=0
|
|
|
|
libname=$1
|
|
output=version.h
|
|
|
|
LIBNAME=`echo ${libname} | tr 'a-z' 'A-Z'`
|
|
export version=${major}.${minor}.${patch}
|
|
export buildid=`git log -1 --pretty=format:"git-%cd-%h" --date=short 2>/dev/null`
|
|
autogen_version_h()
|
|
{
|
|
cat > version.h <<!
|
|
/* Automatically generated by version.sh - do not modify! */
|
|
#ifndef ${LIBNAME}_VERSION_H
|
|
#define ${LIBNAME}_VERSION_H
|
|
|
|
#define ${libname}_version ${version}
|
|
#define ${libname}_buildid ${buildid}
|
|
|
|
#endif
|
|
|
|
!
|
|
}
|
|
|
|
autogen_version_h
|