|
|
Improve reliability of version.sh with CVS checkouts
#!/bin/sh
# SPDX-License-Identifier: GPL-3.0-or-later
#
# $Id: version.sh,v 1.2 2026/05/10 01:58:46 asm Exp $
#
# Gets version string.
# Called by configure.ac via m4_esyscmd_s.
#
# Copyright (C) 2026 Free Software Foundation, Inc.
#
# Author: Anton McClure <asm@gnu.org>
if [ ! -f .ver ] || [ -z `cat .ver 2>/dev/null` ]; then
printf "cvs_" > .ver
date +%s >> .ver
fi
ver=$(cat .ver)
echo "$ver"
exit 0