diff options
author | Ruslan Kovalev <ruslan.a.kovalev@gmail.com> | 2022-02-10 16:46:45 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:45 +0300 |
commit | 9123176b341b6f2658cff5132482b8237c1416c8 (patch) | |
tree | 49e222ea1c5804306084bb3ae065bb702625360f /contrib/libs/zstd06/gen_renames.sh | |
parent | 59e19371de37995fcb36beb16cd6ec030af960bc (diff) | |
download | ydb-9123176b341b6f2658cff5132482b8237c1416c8.tar.gz |
Restoring authorship annotation for Ruslan Kovalev <ruslan.a.kovalev@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/zstd06/gen_renames.sh')
-rwxr-xr-x | contrib/libs/zstd06/gen_renames.sh | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/contrib/libs/zstd06/gen_renames.sh b/contrib/libs/zstd06/gen_renames.sh index 0001bed99e..837166a1a7 100755 --- a/contrib/libs/zstd06/gen_renames.sh +++ b/contrib/libs/zstd06/gen_renames.sh @@ -1,8 +1,8 @@ -#!/bin/bash - -ZSTD_ARCHIVE=${1-./libcontrib-libs-zstd06.a} -nm $ZSTD_ARCHIVE --defined-only -g | egrep '^00' | sed 's/Legacy06_//' | cut -d ' ' -f 3 | awk 'BEGIN{print "#pragma once"}{printf("#define %s Legacy06_%s\n", $1, $1)}' > renames.h - -for f in $(find . -name '*.h' | grep -v renames); do - cat "$f" | grep -v '#include "renames' | awk 'BEGIN{print "#include <contrib/libs/zstd06/renames.h>"}{print}' > "$f.tmp" && grep -q '#include' "$f.tmp" && mv "$f.tmp" "$f" || rm "$f.tmp" -done +#!/bin/bash + +ZSTD_ARCHIVE=${1-./libcontrib-libs-zstd06.a} +nm $ZSTD_ARCHIVE --defined-only -g | egrep '^00' | sed 's/Legacy06_//' | cut -d ' ' -f 3 | awk 'BEGIN{print "#pragma once"}{printf("#define %s Legacy06_%s\n", $1, $1)}' > renames.h + +for f in $(find . -name '*.h' | grep -v renames); do + cat "$f" | grep -v '#include "renames' | awk 'BEGIN{print "#include <contrib/libs/zstd06/renames.h>"}{print}' > "$f.tmp" && grep -q '#include' "$f.tmp" && mv "$f.tmp" "$f" || rm "$f.tmp" +done |