1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +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,5 +1,6 @@
#!/bin/bash -e
top="$(git rev-parse --show-toplevel)"
files="$(git ls-files ':/*.[ch]')"
args=
@ -10,7 +11,7 @@ case "$1" in
;;
esac
for SCRIPT in ${@-coccinelle/*.cocci} ; do
for SCRIPT in ${@-$top/coccinelle/*.cocci} ; do
echo "--x-- Processing $SCRIPT --x--"
TMPFILE=`mktemp`
echo "+ spatch --sp-file $SCRIPT $args ..."

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

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