mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-22 01:51:51 +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
|
||||
|
||||
# shellcheck disable=SC2013,SC1004
|
||||
|
||||
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;
|
||||
/^[ \t]*$/d;
|
||||
s/,.*$//;
|
||||
s/\tPB_//;
|
||||
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_uf=$(echo "$x" | sed -nr 's/^./&#\\\
|
||||
/;
|
||||
|
Loading…
x
Reference in New Issue
Block a user