Author: will Date: Sun Jul 1 01:09:52 2018 New Revision: 335831 URL: https://svnweb.freebsd.org/changeset/base/335831
Log: beinstall: enable use with git worktrees. Modified: head/tools/build/beinstall.sh Modified: head/tools/build/beinstall.sh ============================================================================== --- head/tools/build/beinstall.sh Sun Jul 1 01:01:59 2018 (r335830) +++ head/tools/build/beinstall.sh Sun Jul 1 01:09:52 2018 (r335831) @@ -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') _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"