]> git.ipfire.org Git - thirdparty/systemd.git/blame - tools/find-tabs.sh
hwdb: HP ZBook Studio G4 wireless switch
[thirdparty/systemd.git] / tools / find-tabs.sh
CommitLineData
8244a877
LP
1#!/bin/sh
2# SPDX-License-Identifier: LGPL-2.1+
3
4case "$1" in
5
6 recdiff)
7 if [ "$2" = "" ] ; then
8 DIR="$PWD/.."
9 else
10 DIR="$2"
11 fi
12
13 find $DIR -type f \( -name '*.[ch]' -o -name '*.xml' \) -exec $0 diff \{\} \;
14 ;;
15
16 recpatch)
17 if [ "$2" = "" ] ; then
18 DIR="$PWD/.."
19 else
20 DIR="$2"
21 fi
22
23 find $DIR -type f \( -name '*.[ch]' -o -name '*.xml' \) -exec $0 patch \{\} \;
24 ;;
25
26 diff)
27 T=`mktemp`
28 sed 's/\t/ /g' < "$2" > "$T"
29 diff -u "$2" "$T"
30 rm -f "$T"
31 ;;
32
33 patch)
34 sed -i 's/\t/ /g' "$2"
35 ;;
36
37 *)
38 echo "Expected recdiff|recpatch|diff|patch as verb." >&2
39 ;;
40esac