mirror of
https://github.com/trapexit/mergerfs.git
synced 2024-11-30 04:23:43 +08:00
19 lines
398 B
Bash
Executable File
19 lines
398 B
Bash
Executable File
#!/bin/sh
|
|
|
|
VERSION=$(git describe --always --tags --dirty)
|
|
if [ $? -ne 0 ]; then
|
|
VERSION=$(cat VERSION)
|
|
fi
|
|
|
|
if [ "${VERSION}" = "" ]; then
|
|
VERSION="unknown"
|
|
fi
|
|
|
|
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
|