diff options
author | Ruslan Kovalev <ruslan.a.kovalev@gmail.com> | 2022-02-10 16:46:44 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:44 +0300 |
commit | 59e19371de37995fcb36beb16cd6ec030af960bc (patch) | |
tree | fa68e36093ebff8b805462e9e6d331fe9d348214 /contrib/libs/zstd06/gen_renames.sh | |
parent | 89db6fe2fe2c32d2a832ddfeb04e8d078e301084 (diff) | |
download | ydb-59e19371de37995fcb36beb16cd6ec030af960bc.tar.gz |
Restoring authorship annotation for Ruslan Kovalev <ruslan.a.kovalev@gmail.com>. Commit 1 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 837166a1a7..0001bed99e 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 |