2016-12-01 02:41:39 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
name=$(basename $0)
|
|
|
|
root="$(dirname $(dirname $(dirname $0)))"
|
|
|
|
gomtree=$(readlink -f ${root}/gomtree)
|
2017-01-20 16:29:59 +00:00
|
|
|
left=$(mktemp -t -d go-mtree.XXXXXX)
|
|
|
|
right=$(mktemp -t -d go-mtree.XXXXXX)
|
2016-12-01 02:41:39 +00:00
|
|
|
|
|
|
|
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}
|