aboutsummaryrefslogtreecommitdiff
path: root/dependencies/analyses/dependency-tree.sh
diff options
context:
space:
mode:
Diffstat (limited to 'dependencies/analyses/dependency-tree.sh')
-rwxr-xr-xdependencies/analyses/dependency-tree.sh11
1 files changed, 4 insertions, 7 deletions
diff --git a/dependencies/analyses/dependency-tree.sh b/dependencies/analyses/dependency-tree.sh
index 9a2e3282d..84085a50d 100755
--- a/dependencies/analyses/dependency-tree.sh
+++ b/dependencies/analyses/dependency-tree.sh
@@ -5,16 +5,13 @@ if test "$#" -ne 1; then
exit 1
fi
-DATA=$(go list $1/... \
+go list $1/... \
| xargs -d '\n' go list -f '{{ .ImportPath }}: {{ join .Imports ", " }}' \
| awk '{ printf "%s\n\n", $0 }' \
- )
+ > direct-tree.tmp.$$ && mv -f direct-tree.tmp.$$ direct-tree.txt
-echo "$DATA" > direct-tree.txt
-DATA=$(go list $1/... \
+go list $1/... \
| xargs -d '\n' go list -f '{{ .ImportPath }}: {{ join .Deps ", " }}' \
| awk '{ printf "%s\n\n", $0 }' \
- )
-
-echo "$DATA" > transitive-tree.txt
+ > transitive-tree.tmp.$$ && mv -f transitive-tree.tmp.$$ transitive-tree.txt