mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-29 13:28:27 +00:00
scripts/protobuf-gen.sh: fix (not ignore) shellcheck warnings
This basically replaces for x in $(sed ...); do with sed ... | while IFS= read -r x; do The only caveat is, sed program was amended to remove empty lines (there was one right above the PB_AUTOGEN_STOP). Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
parent
75b859f23f
commit
0a872ccf16
@ -1,15 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# shellcheck disable=SC2013,SC1004
|
|
||||||
|
|
||||||
TR="y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/"
|
TR="y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/"
|
||||||
|
|
||||||
for x in $(sed -n '/PB_AUTOGEN_START/,/PB_AUTOGEN_STOP/ {
|
sed -n '/PB_AUTOGEN_START/,/PB_AUTOGEN_STOP/ {
|
||||||
/PB_AUTOGEN_ST/d;
|
/PB_AUTOGEN_ST/d;
|
||||||
|
/^[ \t]*$/d;
|
||||||
s/,.*$//;
|
s/,.*$//;
|
||||||
s/\tPB_//;
|
s/\tPB_//;
|
||||||
p;
|
p;
|
||||||
}' criu/include/protobuf-desc.h); do
|
}' criu/include/protobuf-desc.h | \
|
||||||
|
while IFS= read -r x; do
|
||||||
x_la=$(echo "$x" | sed $TR)
|
x_la=$(echo "$x" | sed $TR)
|
||||||
x_uf=$(echo "$x" | sed -nr 's/^./&#\\\
|
x_uf=$(echo "$x" | sed -nr 's/^./&#\\\
|
||||||
/;
|
/;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user