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:
parent
b47837ac41
commit
12b74c38e2
@ -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 ..."
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user