dosemu2/git-rev.sh
geos_one 17bb5d7efa
Some checks failed
Build / build (push) Has been cancelled
New upstream version 2.0-0.9
2025-08-14 09:28:49 +02:00

20 lines
432 B
Bash
Executable File

#!/bin/sh
if [ $# != 2 ]; then
echo "Usage: $0 <src_dir> <build_dir>" >&2
exit 1
fi
DATE=`git -C $1 log -1 --format=%cd --date=rfc`
if [ $? != 0 ]; then
echo "Non-git builds deprecated" >&2
exit 1
fi
TSTAMP=$2/.tstamp
if ! touch --date="$DATE" $TSTAMP 2>/dev/null; then
echo "touch doesnt support --date, build may be incomplete" >&2
if [ ! -f "$TSTAMP" ]; then
touch $TSTAMP
fi
fi
echo $TSTAMP