diff options
author | 2018-06-07 15:07:14 +0200 | |
---|---|---|
committer | 2018-06-07 16:22:16 +0200 | |
commit | 12b74c38e2785a9e9503894e585722900882a056 (patch) | |
tree | 36b643166c2be9c57a19157b3e955010693e85b9 /tools | |
parent | hwdb: HP ZBook Studio G4 wireless switch (diff) | |
download | systemd-12b74c38e2785a9e9503894e585722900882a056.tar.gz systemd-12b74c38e2785a9e9503894e585722900882a056.tar.bz2 systemd-12b74c38e2785a9e9503894e585722900882a056.zip |
tools: make various scripts find the top-levle git dir automatically
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/find-double-newline.sh | 6 | ||||
-rwxr-xr-x | tools/find-tabs.sh | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/tools/find-double-newline.sh b/tools/find-double-newline.sh index 6e7e4cb69..6a6790b4b 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 diff --git a/tools/find-tabs.sh b/tools/find-tabs.sh index 611931c4b..e32eac8f3 100755 --- a/tools/find-tabs.sh +++ b/tools/find-tabs.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 |