X-Git-Url: https://git.exim.org/users/heiko/exim.git/blobdiff_plain/9242a7e8cfa94bbc9dd7eca6bd651b569b871c4e..5fd28bb83f80141b9f7671ed9ae3e1a4263134e3:/src/scripts/reversion diff --git a/src/scripts/reversion b/src/scripts/reversion index 5e0ed8554..0ee2f8dc7 100755 --- a/src/scripts/reversion +++ b/src/scripts/reversion @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) The Exim Maintainers 2017 +# Copyright (c) The Exim Maintainers 1995 - 2018 set -e LC_ALL=C @@ -37,7 +37,7 @@ fi # If this tree is a git working directory, use that to get version information. -if [ -d ../../.git ] || [ "$1" = "release" ] +if [ -d ../../.git ] || [ -f ../../.git ] || [ "$1" = "release" ] then # Modify the output of git describe into separate parts for # the name "exim" and the release and variant versions. @@ -96,7 +96,7 @@ if [ ".${SOURCE_DATE_EPOCH:-}" != "." ]; then # builds without it causing any problems: nothing really cares about timezone. # GNU date: "date -d @TS" # BSD date: "date -r TS" - exim_build_date_override="$(date -u -d "@${SOURCE_DATE_EPOCH}" "$fmt" 2>/dev/null | date -u -r "${SOURCE_DATE_EPOCH}" "$fmt" 2>/dev/null)" + exim_build_date_override="$(date -u -d "@${SOURCE_DATE_EPOCH}" "$fmt" 2>/dev/null || date -u -r "${SOURCE_DATE_EPOCH}" "$fmt" 2>/dev/null)" fi ( echo '# automatically generated file - see ../scripts/reversion'