]> Sergey Matveev's repositories - mmc.git/blob - cmd/download
Simpler scrollback history getter
[mmc.git] / cmd / download
1 #!/bin/sh -e
2
3 [ $# -eq 2 ] || {
4     echo "Usage: $0 path/to/state fileId" >&2
5     exit 1
6 }
7 tmp=`mktemp`
8 trap "rm -f $tmp" HUP PIPE INT QUIT TERM EXIT
9 echo $2 > "$1"/file/get &
10 cat "$1"/file/out > $tmp
11 mv $tmp $2.tar
12 echo $2.tar
13 tar tvf $2.tar