mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-22 03:04:34 +01:00
beinstall: enable use with git worktrees.
This commit is contained in:
parent
f25b23cf89
commit
7d4a3185c9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=335831
@ -101,7 +101,8 @@ trap 'errx "Interrupt caught"' HUP INT TERM
|
||||
objdir=$(make -V .OBJDIR 2>/dev/null)
|
||||
[ ! -d "${objdir}" ] && errx "Must have built FreeBSD from source tree"
|
||||
|
||||
if [ -d .git ] ; then
|
||||
# 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)
|
||||
[ $? -ne 0 ] && errx "Can't lookup git commit timestamp"
|
||||
commit_ts=$(date -r ${commit_time} '+%Y%m%d.%H%M%S')
|
||||
|
Loading…
Reference in New Issue
Block a user