summaryrefslogtreecommitdiff
path: root/tools/find-double-newline.sh
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-06-07 15:07:14 +0200
committerSven Eden <yamakuzure@gmx.net>2018-08-24 16:47:08 +0200
commit667cf93a38ec7a927acabe4cd6282fe2f274f70a (patch)
tree73018dad6cc8501fc2d8bbd5ce168eb4ed95c0ee /tools/find-double-newline.sh
parentdc4783d6c8512a2e78f32c1452632e055666dc76 (diff)
tools: make various scripts find the top-levle git dir automatically
Diffstat (limited to 'tools/find-double-newline.sh')
-rw-r--r--tools/find-double-newline.sh6
1 files changed, 4 insertions, 2 deletions
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