mirror of
https://git.adityakumar.xyz/llama.cpp.git
synced 2024-11-09 15:29:43 +00:00
82552b7f54
* fix line breaking * build number line break removal
23 lines
457 B
Bash
Executable file
23 lines
457 B
Bash
Executable file
#!/bin/sh
|
|
|
|
BUILD_NUMBER="0"
|
|
BUILD_COMMIT="unknown"
|
|
|
|
REV_LIST=$(git rev-list --count HEAD)
|
|
if [ $? -eq 0 ]; then
|
|
BUILD_NUMBER=$REV_LIST
|
|
fi
|
|
|
|
REV_PARSE=$(git rev-parse --short HEAD)
|
|
if [ $? -eq 0 ]; then
|
|
BUILD_COMMIT=$REV_PARSE
|
|
fi
|
|
|
|
echo "#ifndef BUILD_INFO_H"
|
|
echo "#define BUILD_INFO_H"
|
|
echo ""
|
|
echo "#define BUILD_NUMBER $BUILD_NUMBER" | tr -d '\n'
|
|
echo ""
|
|
echo "#define BUILD_COMMIT \"$BUILD_COMMIT\"" | tr -d '\n'
|
|
echo ""
|
|
echo "#endif // BUILD_INFO_H"
|