1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2024-12-18 20:16:31 +00:00
go-mtree/test/cli/0007.sh

19 lines
479 B
Bash
Raw Normal View History

#!/bin/bash
set -e
name=$(basename $0)
root="$(dirname $(dirname $(dirname $0)))"
gomtree=$(go run ${root}/test/realpath/main.go ${root}/gomtree)
2018-08-14 01:20:31 +00:00
left=$(mktemp -d -t go-mtree.XXXXXX)
right=$(mktemp -d -t go-mtree.XXXXXX)
echo "[${name}] Running in ${left} and ${right}"
touch ${left}/one
touch ${left}/two
cp -a ${left}/one ${right}/
$gomtree -K "sha256digest" -p ${left} -c > /tmp/left.mtree
$gomtree -k "sha256digest" -p ${right} -f /tmp/left.mtree
rm -fr ${left} ${right}