]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - tools/find-double-newline.sh
core: skip unit deserialization and move to the next one when unit_deserialize()...
[thirdparty/systemd.git] / tools / find-double-newline.sh
index c41811483cbb91fae5510ef22270fdd230980fe3..6a6790b4b2ab1eda8e53f47f450fbd711f959687 100755 (executable)
@@ -1,26 +1,28 @@
 #!/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
 
-                find $DIR -type f \( -name '*.c' -o -name '*.xml' \) -exec $0 diff \{\} \;
+                find $DIR -type f \( -name '*.[ch]' -o -name '*.xml' \) -exec $0 diff \{\} \;
                 ;;
 
         recpatch)
                 if [ "$2" = "" ] ; then
-                        DIR="$PWD/.."
+                        DIR="$TOP"
                 else
                         DIR="$2"
                 fi
 
-                find $DIR -type f \( -name '*.c' -o -name '*.xml' \) -exec $0 patch \{\} \;
+                find $DIR -type f \( -name '*.[ch]' -o -name '*.xml' \) -exec $0 patch \{\} \;
                 ;;
 
         diff)