mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-28 10:02:14 +00:00
19 lines
480 B
Batchfile
Executable file
19 lines
480 B
Batchfile
Executable file
#!/bin/sh
|
|
|
|
export REVISION_INC=$1/dcrevision.inc
|
|
|
|
rm -f $REVISION_INC
|
|
cp ../units/dcrevision.inc $REVISION_INC
|
|
|
|
export REVISION=$(git -C $1 show -s --format="%h" HEAD)
|
|
export COMMIT=$(git -C $1 show -s --format="%ct" HEAD)
|
|
|
|
if [ $REVISION ] && [ $COMMIT ]; then
|
|
|
|
echo "// Created by Git2RevisionInc" > $REVISION_INC
|
|
echo "const dcRevision = '$REVISION';" >> $REVISION_INC
|
|
echo "const dcCommit = $COMMIT;" >> $REVISION_INC
|
|
|
|
fi
|
|
|
|
echo "Git revision" $REVISION $COMMIT
|