Docs: adapt the rotation client example to the API changes
[lttng-tools.git] / doc / examples / rotation / rotate-client-compress.sh
1 #!/bin/bash
2
3 # Receive the path of a chunk of trace, compress it to a temporary directory
4 # and delete the chunk.
5
6 TRACE_PATH="$1"
7 TRACE_NAME="$(basename "$TRACE_PATH")"
8 OUT_PATH="$(mktemp -d)"
9
10 cd "$TRACE_PATH/.."
11
12 tar czf ${OUT_PATH}/${TRACE_NAME}.tar.gz $TRACE_NAME
13 echo "New trace chunk archive compressed to ${OUT_PATH}/${TRACE_NAME}.tar.gz"
14 rm -rf "$TRACE_PATH"
This page took 0.029298 seconds and 4 git commands to generate.