mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 21:05:08 +00:00
beinstall.sh: Check correct exit status
When retrieving the timestamp of the last commit using git-show(1), do not pipe the output to head(1), otherwise the return value in $? will be for head(1) and not git-show(1). Approved by: bapt Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D37742
This commit is contained in:
parent
01143ba118
commit
a0c50eda29
|
@ -181,7 +181,7 @@ MERGEMASTER_CMD="${srcdir}/usr.sbin/mergemaster/mergemaster.sh"
|
|||
|
||||
# May be a worktree, in which case .git is a file, not a directory.
|
||||
if [ -e .git ] ; then
|
||||
commit_time=$(git show --format='%ct' 2>/dev/null | head -1)
|
||||
commit_time=$(git show -s --format='%ct' 2>/dev/null)
|
||||
[ $? -ne 0 ] && errx "Can't lookup git commit timestamp"
|
||||
commit_ts=$(date -r ${commit_time} '+%Y%m%d.%H%M%S')
|
||||
elif [ -d .svn ] ; then
|
||||
|
|
Loading…
Reference in a new issue