fix: make collect-profiles.sh work on mac

The version of `date` that ships with darwin does not support the `-Iseconds` flag.

Use a pattern with `date` to achieve the same thing but should have better cross platform support.

License: MIT
Signed-off-by: 's avatarOli Evans <oli@tableflip.io>
上级 ad9cbbd2
...@@ -36,9 +36,5 @@ echo "Disabling mutex profiling" ...@@ -36,9 +36,5 @@ echo "Disabling mutex profiling"
curl -X POST -v "http://$HTTP_API"'/debug/pprof-mutex/?fraction=0' curl -X POST -v "http://$HTTP_API"'/debug/pprof-mutex/?fraction=0'
popd popd
tar cvzf "./ipfs-profile-$(uname -n)-$(date -Iseconds).tar.gz" -C "$tmpdir" . tar cvzf "./ipfs-profile-$(uname -n)-$(date +'%Y-%m-%dT%H:%M:%S%z').tar.gz" -C "$tmpdir" .
rm -rf "$tmpdir" rm -rf "$tmpdir"
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论