mirror of
https://github.com/trapexit/mergerfs.git
synced 2024-11-29 03:48:23 +08:00
17 lines
348 B
Plaintext
17 lines
348 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
GIT=$(which git)
|
||
|
if [ "${GIT}" = "" ]; then
|
||
|
exit 0
|
||
|
fi
|
||
|
|
||
|
VERSION=$(git describe --always --tags --dirty)
|
||
|
|
||
|
echo -n "${VERSION}" > VERSION
|
||
|
grep -q \"${VERSION}\" src/version.hpp
|
||
|
RV=$?
|
||
|
if [ $RV -ne 0 ]; then
|
||
|
echo "#pragma once" > src/version.hpp
|
||
|
echo "static const char MERGERFS_VERSION[] = \"${VERSION}\";" >> src/version.hpp
|
||
|
fi
|