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
committerLennart Poettering <lennart@poettering.net>2018-06-07 16:22:16 +0200
commit12b74c38e2785a9e9503894e585722900882a056 (patch)
tree36b643166c2be9c57a19157b3e955010693e85b9 /tools/find-double-newline.sh
parentb47837ac412ca9871a1dafa68ad7d77e5e0a76d7 (diff)
downloadsystemd-12b74c38e2785a9e9503894e585722900882a056.tar.gz
tools: make various scripts find the top-levle git dir automatically
Diffstat (limited to 'tools/find-double-newline.sh')
-rwxr-xr-xtools/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 6e7e4cb699..6a6790b4b2 100755
--- 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