From: David Lamparter Date: Fri, 18 Jan 2019 14:14:46 +0000 (+0100) Subject: tools/tarsource.sh: support FRR as a git submodule X-Git-Tag: frr-6.0.3~28^2~1 X-Git-Url: https://git.proxmox.com/?p=mirror_frr.git;a=commitdiff_plain;h=808ac6296cdc11a40dfb263c3dfa67297dbfa8ff 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 --- diff --git a/tools/tarsource.sh b/tools/tarsource.sh index 110558da0..2e7ed4411 100755 --- a/tools/tarsource.sh +++ b/tools/tarsource.sh @@ -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