]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: also indent scripts with 8 spaces
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 24 Apr 2017 23:40:02 +0000 (19:40 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 25 Apr 2017 12:49:16 +0000 (08:49 -0400)
21 files changed:
.dir-locals.el
src/basic/af-to-name.awk
src/basic/arphrd-to-name.awk
src/basic/cap-to-name.awk
src/basic/errno-to-name.awk
src/basic/generate-af-list.sh
src/basic/generate-arphrd-list.sh
src/basic/generate-cap-list.sh
src/basic/generate-errno-list.sh
src/boot/efi/no-undefined-symbols.sh
src/core/load-fragment-gperf-nulstr.awk
src/journal/audit_type-to-name.awk
src/journal/generate-audit_type-list.sh
src/resolve/dns_type-to-name.awk
src/test/test-hashmap-ordered.awk
src/udev/generate-keyboard-keys-list.sh
test/test-efi-create-disk.sh
tools/meson-check-help.sh
tools/meson-git-contrib.sh
tools/meson-make-symlink.sh
units/meson-add-wants.sh

index 9dfdbe3fe264b0c20ab224bf34542a35d5c245fb..5ef7e11634cd942602ba45b97e7e86a9e62d070e 100644 (file)
@@ -21,4 +21,7 @@
             (eval . (c-set-offset 'arglist-close 0))))
  (nxml-mode . ((nxml-child-indent . 2)
                (fill-column . 119)))
- (meson-mode . ((meson-indent-basic . 8))))
+ (meson-mode . ((meson-indent-basic . 8)))
+ (sh-mode . ((sh-basic-offset . 8)
+             (sh-indentation . 8)))
+ (awk-mode . ((c-basic-offset . 8))))
index e20830487fa6b7741af12bcd16281c1d90259946..18d0a8972845c1e7a2e3c6d2a0f558a64c6c78b4 100644 (file)
@@ -1,5 +1,9 @@
-BEGIN{ print "static const char* const af_names[] = { "}
+BEGIN{
+        print "static const char* const af_names[] = { "
+}
 !/AF_FILE/ && !/AF_ROUTE/ && !/AF_LOCAL/ {
-    printf "        [%s] = \"%s\",\n", $1, $1
+        printf "        [%s] = \"%s\",\n", $1, $1
+}
+END{
+        print "};"
 }
-END{print "};"}
index 57e4680f17454e0c0c2df421f4e8b64f9c4815ed..5a35673e2c977bc97fdad28c0d656fb0aefc56bd 100644 (file)
@@ -1,5 +1,9 @@
-BEGIN{ print "static const char* const arphrd_names[] = { "}
+BEGIN{
+        print "static const char* const arphrd_names[] = { "
+}
 !/CISCO/ {
-    printf "        [ARPHRD_%s] = \"%s\",\n", $1, $1
+        printf "        [ARPHRD_%s] = \"%s\",\n", $1, $1
+}
+END{
+        print "};"
 }
-END{print "};"}
index d252291851e0134076ca405a613b68916425e5bf..402a782024eb238d4c35316eb06fa26f782e52cf 100644 (file)
@@ -1,5 +1,9 @@
-BEGIN{ print "static const char* const capability_names[] = { "}
+BEGIN{
+        print "static const char* const capability_names[] = { "
+}
 {
-    printf "        [%s] = \"%s\",\n", $1, tolower($1)
+        printf "        [%s] = \"%s\",\n", $1, tolower($1)
+}
+END{
+        print "};"
 }
-END{print "};"}
index c48c8f93ab15dc0e0e415d18256506cff207ae49..0878abacbd61e91e224e72c051e2ac2d303dbbd3 100644 (file)
@@ -1,4 +1,9 @@
-BEGIN{ print "static const char* const errno_names[] = { " }
+BEGIN{
+        print "static const char* const errno_names[] = { "
+}
 !/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ {
-    printf "        [%s] = \"%s\",\n", $1, $1 }
-END{ print "};" }
+        printf "        [%s] = \"%s\",\n", $1, $1
+}
+END{
+        print "};"
+}
index 733cf59dd0d688815b0c515a02324de70883a374..8d9cdd1836249607a2bf1f562898ee156dee839e 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh -eu
 
 $1 -E -dM -include sys/socket.h - </dev/null | \
-    grep -Ev 'AF_UNSPEC|AF_MAX' | \
-    awk '/^#define[ \t]+AF_[^ \t]+[ \t]+PF_[^ \t]/ { print $2; }'
+        grep -Ev 'AF_UNSPEC|AF_MAX' | \
+        awk '/^#define[ \t]+AF_[^ \t]+[ \t]+PF_[^ \t]/ { print $2; }'
index 3c2bc5483dd3060e0bc5faeb02dcacde65e02f21..ee207fb38e63006861055cf2ca653d13f22990ea 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh -eu
 
 $1 -dM -include net/if_arp.h - </dev/null | \
-    awk '/^#define[ \t]+ARPHRD_[^ \t]+[ \t]+[^ \t]/ { print $2; }' | \
-    sed -e 's/ARPHRD_//'
+        awk '/^#define[ \t]+ARPHRD_[^ \t]+[ \t]+[^ \t]/ { print $2; }' | \
+        sed -e 's/ARPHRD_//'
index 3ac3544539d43dfc7f654045f0c401cf13730b40..1d4a562e7cffde6a8fe7ee723d8029f21c4fc7de 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh -eu
 
 $1 -dM -include linux/capability.h -include "$2" -include "$3" - </dev/null | \
-    awk '/^#define[ \t]+CAP_[A-Z_]+[ \t]+/ { print $2; }' | \
-    grep -v CAP_LAST_CAP
+        awk '/^#define[ \t]+CAP_[A-Z_]+[ \t]+/ { print $2; }' | \
+        grep -v CAP_LAST_CAP
index a8b493864477c17ccb0d9e82965c178bfaabeeee..e2bab8b3201053af9f16ad7eeacf6a91c23af957 100755 (executable)
@@ -1,4 +1,4 @@
 #!/bin/sh -eu
 
 $1 -dM -include errno.h - </dev/null | \
-    awk '/^#define[ \t]+E[^ _]+[ \t]+/ { print $2; }'
+        awk '/^#define[ \t]+E[^ _]+[ \t]+/ { print $2; }'
index 14a1a087bb14f0d5e4d6365f178978e745d59363..08b266c455a6134a6df4efa81adaa68442997e45 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh -eu
 
 if nm -D -u "$1" | grep ' U '; then
-    echo "Undefined symbols detected!"
-    exit 1
+        echo "Undefined symbols detected!"
+        exit 1
 fi
index bc66ff221d7cf29358cdaa8708d2ad30397ace67..b52438abe30893c3d9bdbfef041025f674e8277d 100644 (file)
@@ -1,12 +1,14 @@
 BEGIN{
-    keywords=0 ; FS="," ;
-    print "extern const char load_fragment_gperf_nulstr[];" ;
-    print "const char load_fragment_gperf_nulstr[] ="
+        keywords=0 ; FS="," ;
+        print "extern const char load_fragment_gperf_nulstr[];" ;
+        print "const char load_fragment_gperf_nulstr[] ="
 }
 keyword==1 {
-    print "\"" $$1 "\\0\""
+        print "\"" $$1 "\\0\""
 }
 /%%/ {
-    keyword=1
+        keyword=1
+}
+END {
+        print ";"
 }
-END { print ";" }
index 38a4b05321459e084174b80d0343856b033b88c5..44fc702eb3d314626e5026a2f0bbd2f97b2ddacf 100644 (file)
@@ -1,5 +1,9 @@
-BEGIN{ print "const char *audit_type_to_string(int type) {\n\tswitch(type) {" }
+BEGIN{
+        print "const char *audit_type_to_string(int type) {\n\tswitch(type) {"
+}
 {
         printf "        case AUDIT_%s: return \"%s\";\n", $1, $1
 }
-END{ print "        default: return NULL;\n\t}\n}\n" }
+END{
+        print "        default: return NULL;\n\t}\n}\n"
+}
index c9476b7809b4068b29b1061232630ea41d6c8a36..18cbe0599c7fccbc472254b74676a24f23bc583a 100755 (executable)
@@ -5,10 +5,10 @@ shift
 
 includes=""
 for i in "$@"; do
-    includes="$includes -include $i"
+        includes="$includes -include $i"
 done
 
 $cpp -dM $includes - </dev/null | \
-    grep -vE 'AUDIT_.*(FIRST|LAST)_' | \
-    sed -r -n 's/^#define\s+AUDIT_(\w+)\s+([0-9]{4})\s*$$/\1\t\2/p' | \
-    sort -k2
+        grep -vE 'AUDIT_.*(FIRST|LAST)_' | \
+        sed -r -n 's/^#define\s+AUDIT_(\w+)\s+([0-9]{4})\s*$$/\1\t\2/p' | \
+        sort -k2
index 64d675b0a9b64910fa4954d75b3690751b08587f..badb1824b5a38608a586c17cff1c0f796220c69b 100644 (file)
@@ -1,7 +1,11 @@
-BEGIN{ print "const char *dns_type_to_string(int type) {\n\tswitch(type) {" }
+BEGIN{
+        print "const char *dns_type_to_string(int type) {\n\tswitch(type) {"
+}
 {
-    printf "        case DNS_TYPE_%s: return ", $1;
-    sub(/_/, "-");
-    printf "\"%s\";\n", $1
+        printf "        case DNS_TYPE_%s: return ", $1;
+        sub(/_/, "-");
+        printf "\"%s\";\n", $1
+}
+END{
+        print "        default: return NULL;\n\t}\n}\n"
 }
-END{ print "        default: return NULL;\n\t}\n}\n" }
index 4e75a4655a6eb6706e5a856c1672cddc6d9795db..10f4386fa4d1374c3462555c2e63c867997e827c 100644 (file)
@@ -1,11 +1,11 @@
 BEGIN {
-    print "/* GENERATED FILE */";
-    print "#define ORDERED"
+        print "/* GENERATED FILE */";
+        print "#define ORDERED"
 }
 {
-    if (!match($0, "^#include"))
-        gsub(/hashmap/, "ordered_hashmap");
-    gsub(/HASHMAP/, "ORDERED_HASHMAP");
-    gsub(/Hashmap/, "OrderedHashmap");
-    print
+        if (!match($0, "^#include"))
+                gsub(/hashmap/, "ordered_hashmap");
+        gsub(/HASHMAP/, "ORDERED_HASHMAP");
+        gsub(/Hashmap/, "OrderedHashmap");
+        print
 }
index 5fb5ed0bbede8403b30574aa32abaecbffb98747..479e49318264342b01070f146ddb3b5ac1a26014 100755 (executable)
@@ -1,4 +1,4 @@
 #!/bin/sh -eu
 
 $1 -dM -include linux/input.h - </dev/null | \
-    awk '/^#define[ \t]+KEY_[^ ]+[ \t]+[0-9K]/ { if ($2 != "KEY_MAX") { print $2 } }'
+        awk '/^#define[ \t]+KEY_[^ ]+[ \t]+[0-9K]/ { if ($2 != "KEY_MAX") { print $2 } }'
index d3a8b5f8ed6f5ee2a398f89cef22d74c5e7398eb..0216c83c12d844d794e68cd7a34f6f234a095181 100755 (executable)
@@ -5,7 +5,7 @@ systemd_efi="$2"
 boot_stub="$3"
 splash_bmp="$4"
 if [ -z "$out" -o -z "$systemd_efi" -o -z "$boot_stub" -o -z "$splash_bmp" ]; then
-    exit 1
+        exit 1
 fi
 
 # create GPT table with EFI System Partition
@@ -27,12 +27,12 @@ cp "$systemd_efi" mnt/EFI/BOOT/BOOTX64.efi
 mkdir mnt/EFI/Linux
 echo -n "foo=yes bar=no root=/dev/fakeroot debug rd.break=initqueue" >mnt/cmdline.txt
 objcopy \
-  --add-section .osrel=/etc/os-release --change-section-vma .osrel=0x20000 \
-  --add-section .cmdline=mnt/cmdline.txt --change-section-vma .cmdline=0x30000 \
-  --add-section .splash="$splash_bmp" --change-section-vma .splash=0x40000 \
-  --add-section .linux=/boot/$(cat /etc/machine-id)/$(uname -r)/linux --change-section-vma .linux=0x2000000 \
-  --add-section .initrd=/boot/$(cat /etc/machine-id)/$(uname -r)/initrd --change-section-vma .initrd=0x3000000 \
-  "$boot_stub" mnt/EFI/Linux/linux-test.efi
+        --add-section .osrel=/etc/os-release --change-section-vma .osrel=0x20000 \
+        --add-section .cmdline=mnt/cmdline.txt --change-section-vma .cmdline=0x30000 \
+        --add-section .splash="$splash_bmp" --change-section-vma .splash=0x40000 \
+        --add-section .linux=/boot/$(cat /etc/machine-id)/$(uname -r)/linux --change-section-vma .linux=0x2000000 \
+        --add-section .initrd=/boot/$(cat /etc/machine-id)/$(uname -r)/initrd --change-section-vma .initrd=0x3000000 \
+        "$boot_stub" mnt/EFI/Linux/linux-test.efi
 
 # install entries
 mkdir -p mnt/loader/entries
index 7102866a5c265dfff8ec6add48abee972df0120f..47a5099a04c75757c4469dc392652e30759b4208 100755 (executable)
@@ -2,19 +2,19 @@
 
 # output width
 if "$1"  --help | grep -v 'default:' | grep -E -q '.{80}.'; then
-    echo "$(basename "$1") --help output is too wide:"
-    "$1"  --help | awk 'length > 80' | grep -E --color=yes '.{80}'
-    exit 1
+        echo "$(basename "$1") --help output is too wide:"
+        "$1"  --help | awk 'length > 80' | grep -E --color=yes '.{80}'
+        exit 1
 fi
 
 # no --help output to stdout
 if "$1" --help 2>&1 1>/dev/null | grep .; then
-    echo "$(basename "$1") --help prints to stderr"
-    exit 2
+        echo "$(basename "$1") --help prints to stderr"
+        exit 2
 fi
 
 # error output to stderr
 if ! "$1" --no-such-parameter 2>&1 1>/dev/null | grep -q .; then
-    echo "$(basename "$1") with an unknown parameter does not print to stderr"
-    exit 3
+        echo "$(basename "$1") with an unknown parameter does not print to stderr"
+        exit 3
 fi
index ac031638e0da382f402b72969200d19cdb5e1d65..1c614ef511e228434aea188729d71b7bf2f421b4 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh -eu
 
 git shortlog -s `git describe --abbrev=0`.. | \
-    cut -c8- | \
-    sed 's/ / /g' | \
-    awk '{ print $$0 "," }' | \
-    sort -u
+        cut -c8- | \
+        sed 's/ / /g' | \
+        awk '{ print $$0 "," }' | \
+        sort -u
index 360ff92ebb223e83b9e4e12377f4b0516a68b8e7..47a5e70ae5c5e93e06fd692204428ed52ed86f5a 100755 (executable)
@@ -5,7 +5,7 @@
 
 mkdir -vp "$(dirname "${DESTDIR:-}$2")"
 if [ "$(dirname $1)" = . ]; then
-    ln -vfs -T "$1" "${DESTDIR:-}$2"
+        ln -vfs -T "$1" "${DESTDIR:-}$2"
 else
-    ln -vfs -T --relative "${DESTDIR:-}$1" "${DESTDIR:-}$2"
+        ln -vfs -T --relative "${DESTDIR:-}$1" "${DESTDIR:-}$2"
 fi
index e2f5a355bc7da1ee90e681b42bc5cefbe6e5ce5d..dfd287e1722aadac586046395640ef3c70fc259e 100755 (executable)
@@ -5,23 +5,23 @@ target="$2"
 unit="$3"
 
 case "$target" in
-    */?*) # a path, but not just a slash at the end
-        dir="${DESTDIR:-}${target}"
-        ;;
-    *)
-        dir="${DESTDIR:-}${unitdir}/${target}"
-        ;;
+        */?*) # a path, but not just a slash at the end
+                dir="${DESTDIR:-}${target}"
+                ;;
+        *)
+                dir="${DESTDIR:-}${unitdir}/${target}"
+                ;;
 esac
 
 unitpath="${DESTDIR:-}${unitdir}/${unit}"
 
 case "$target" in
-    */)
-        mkdir -p -m 0755 "$dir"
-        ;;
-    *)
-        mkdir -p -m 0755 "$(basename "$dir")"
-        ;;
+        */)
+                mkdir -p -m 0755 "$dir"
+                ;;
+        *)
+                mkdir -p -m 0755 "$(basename "$dir")"
+                ;;
 esac
 
 ln -vfs --relative "$unitpath" "$dir"