From: Lennart Poettering Date: Thu, 7 Jun 2018 13:07:14 +0000 (+0200) Subject: tools: make various scripts find the top-levle git dir automatically X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=667cf93a38ec7a927acabe4cd6282fe2f274f70a;p=elogind.git tools: make various scripts find the top-levle git dir automatically --- diff --git a/tools/find-double-newline.sh b/tools/find-double-newline.sh index 6e7e4cb69..6a6790b4b 100644 --- a/tools/find-double-newline.sh +++ b/tools/find-double-newline.sh @@ -1,11 +1,13 @@ #!/bin/sh # SPDX-License-Identifier: LGPL-2.1+ +TOP=`git rev-parse --show-toplevel` + case "$1" in recdiff) if [ "$2" = "" ] ; then - DIR="$PWD/.." + DIR="$TOP" else DIR="$2" fi @@ -15,7 +17,7 @@ case "$1" in recpatch) if [ "$2" = "" ] ; then - DIR="$PWD/.." + DIR="$TOP" else DIR="$2" fi