Skip to content
Snippets Groups Projects
Commit 59acb0b8 authored by John Crispin's avatar John Crispin
Browse files

scripts: fix getver git dir check


Git internals are referenced by .git which isn't necessarily a
directory. It may also be a file that references the actual .git
directory using the gitdir directive.

If .git is assumed to be a directory the build will not be able to get
the correct version when openwrt is included as a git submodule because
when used as a submodule .git will actually be a file referencing to a
subdirectory in the parent's git dir.

When the correct version is not detected some image generation tools
will fail because the OpenWrt string will be 'OpenWrtunknown' which is
too long for some header formats.

Signed-off-by: default avatarFelix Kaechele <heffer@fedoraproject.org>

SVN-Revision: 44452
parent e07c4f21
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@ try_svn() {
}
try_git() {
[ -d .git ] || return 1
[ -e .git ] || return 1
REV="$(git log | grep -m 1 git-svn-id | awk '{ gsub(/.*@/, "", $0); print $1 }')"
REV="${REV:+r$REV}"
[ -n "$REV" ]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment