summaryrefslogtreecommitdiff
path: root/dependencies/analyses/go-archive-analysis.sh
blob: f10145dad8d592d84649b0385ae4ebac5b59239f (plain)
1
2
3
4
5
6
7
8
9
10
11
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