~ecs/tm

ref: 0022137d89f12741ac3e6cf4173aa876cda5a726 tm/tm-cat -rwxr-xr-x 217 bytes
0022137dEmber Sawady Fix shellcheck warnings 1 year, 10 months ago
                                                                                
1
2
3
4
5
6
7
8
9
#!/bin/sh -eu

# shellcheck source=./lib.sh
. "$(dirname -- "$0")/lib.sh"
if [ $# -ne 1 ]; then
	abort "usage: tm cat <ref>"
fi
ref="$(tm resolve-ref "$1")" || abort "error: invalid ref $1"
cat "$TM_DIR/objects/$ref"