1
0
mirror of https://github.com/systemd/systemd.git synced 2025-08-02 04:22:27 +03:00

tools: make various scripts find the top-levle git dir automatically

This commit is contained in:
Lennart Poettering
2018-06-07 15:07:14 +02:00
parent b47837ac41
commit 12b74c38e2
3 changed files with 10 additions and 5 deletions

View File

@ -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