summaryrefslogtreecommitdiffstats
path: root/tools/tarsource.sh
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2019-01-18 15:14:46 +0100
committerDavid Lamparter <equinox@diac24.net>2019-02-19 21:34:08 +0100
commit4734c22a4f5a7751cfc7bf48091fe23e5a8fab86 (patch)
tree69dcde6f12c9c33464915b71cc51ff7f8d3cfa54 /tools/tarsource.sh
parentdebian: add libyang-dev dependency (diff)
downloadfrr-4734c22a4f5a7751cfc7bf48091fe23e5a8fab86.tar.xz
frr-4734c22a4f5a7751cfc7bf48091fe23e5a8fab86.zip
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>
Diffstat (limited to '')
-rwxr-xr-xtools/tarsource.sh2
1 files changed, 1 insertions, 1 deletions
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