diff options
author | Andreas Schneider <asn@samba.org> | 2022-02-19 08:52:17 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2022-02-22 15:23:35 +0000 |
commit | 2d5d88ff34532ba2d78997467e5720bba480f07e (patch) | |
tree | 9ec6ba2ccfda4bf193d6e776b09623559ac6a3c3 /buildtools/compare_generated.sh | |
parent | a9eebca923ae7461a94448d3f6800e36bbfc8e46 (diff) | |
download | samba-2d5d88ff34532ba2d78997467e5720bba480f07e.tar.gz |
buildtools: Reformat shell scripts
shfmt -f buildtools | xargs shfmt -w -p -i 0 -fn
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'buildtools/compare_generated.sh')
-rwxr-xr-x | buildtools/compare_generated.sh | 59 |
1 files changed, 29 insertions, 30 deletions
diff --git a/buildtools/compare_generated.sh b/buildtools/compare_generated.sh index ebef8a979bd..e6265795813 100755 --- a/buildtools/compare_generated.sh +++ b/buildtools/compare_generated.sh @@ -10,41 +10,40 @@ gen_files=$(cd bin/default && find . -type f -name '*.[ch]') strip_file() { - in_file=$1 - out_file=$2 - cat $in_file | - grep -v 'The following definitions come from' | - grep -v 'Automatically generated at' | - grep -v 'Generated from' | - sed 's|/home/tnagy/samba/source4||g' | - sed 's|/home/tnagy/samba/|../|g' | - sed 's|bin/default/source4/||g' | - sed 's|bin/default/|../|g' | - sed 's/define _____/define ___/g' | - sed 's/define __*/define _/g' | - sed 's/define _DEFAULT_/define _/g' | - sed 's/define _SOURCE4_/define ___/g' | - sed 's/define ___/define _/g' | - sed 's/ifndef ___/ifndef _/g' | - sed 's|endif /* ____|endif /* __|g' | - sed s/__DEFAULT_SOURCE4/__/ | - sed s/__DEFAULT_SOURCE4/__/ | - sed s/__DEFAULT/____/ > $out_file + in_file=$1 + out_file=$2 + cat $in_file | + grep -v 'The following definitions come from' | + grep -v 'Automatically generated at' | + grep -v 'Generated from' | + sed 's|/home/tnagy/samba/source4||g' | + sed 's|/home/tnagy/samba/|../|g' | + sed 's|bin/default/source4/||g' | + sed 's|bin/default/|../|g' | + sed 's/define _____/define ___/g' | + sed 's/define __*/define _/g' | + sed 's/define _DEFAULT_/define _/g' | + sed 's/define _SOURCE4_/define ___/g' | + sed 's/define ___/define _/g' | + sed 's/ifndef ___/ifndef _/g' | + sed 's|endif /* ____|endif /* __|g' | + sed s/__DEFAULT_SOURCE4/__/ | + sed s/__DEFAULT_SOURCE4/__/ | + sed s/__DEFAULT/____/ >$out_file } compare_file() { - f=$f - bname=$(basename $f) - t1=/tmp/$bname.old.$$ - t2=/tmp/$bname.new.$$ - strip_file $old_build/$f $t1 - strip_file bin/default/$f $t2 - diff -u -b $t1 $t2 2>&1 - rm -f $t1 $t2 + f=$f + bname=$(basename $f) + t1=/tmp/$bname.old.$$ + t2=/tmp/$bname.new.$$ + strip_file $old_build/$f $t1 + strip_file bin/default/$f $t2 + diff -u -b $t1 $t2 2>&1 + rm -f $t1 $t2 } for f in $gen_files; do - compare_file $f + compare_file $f done - |