tools/tarsource.sh: support FRR as a git submodule

a git submodule will have .git as a file instead of a directory... which
breaks tarsource.sh.

Signed-off-by: David Lamparter <equinox@diac24.net>
This commit is contained in:
David Lamparter 2019-01-18 15:14:46 +01:00
parent a945249532
commit 4734c22a4f

View File

@ -133,7 +133,7 @@ onexit() {
trap onexit EXIT
tmpdir="`mktemp -d -t frrtar.XXXXXX`"
if test -d "$src/.git"; then
if test -e "$src/.git"; then
commit="`git -C \"$src\" rev-parse \"${commit:-HEAD}\"`"
if $dirty; then