mirror of
https://github.com/containers/podman.git
synced 2025-10-24 15:03:45 +08:00
hack/analyses -> dependencies/analyses
Move the analyses scripts to the dependencies directory to avoid scattering of the dependency management. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
12
dependencies/analyses/go-archive-analysis.sh
vendored
Executable file
12
dependencies/analyses/go-archive-analysis.sh
vendored
Executable file
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
if [ -z "$WORK" ]
|
||||
then
|
||||
echo "WORK environment variable must be set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
grep --no-filename packagefile $WORK/**/importcfg \
|
||||
| awk '{ split($2, data, "="); printf "%s ", data[1]; system("du -sh " data[2]) }' \
|
||||
| awk '{ printf "%s %s\n", $2, $1 }' \
|
||||
| sort -u | sort -rh
|
||||
15
dependencies/analyses/nm-symbols-analysis.sh
vendored
Executable file
15
dependencies/analyses/nm-symbols-analysis.sh
vendored
Executable file
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
if test "$#" -ne 1; then
|
||||
echo "invalid arguments: usage: $0 path/to/binary"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DATA=$(go tool nm -size "$1" \
|
||||
| awk 'NF==4 {printf "%s\t%s\t%s\n", $2, $3, $4}' \
|
||||
| grep -v -P "\t_\t" \
|
||||
| grep -P "\tt\t" \
|
||||
| awk ' {printf "%s\t\t%s\n", $1, $3} ' \
|
||||
)
|
||||
|
||||
echo "$DATA"
|
||||
Reference in New Issue
Block a user