# now truncate some of the files and rename to .part
files=$(find out.d -type f -name "*.tar.gz")
for f in $files; do truncate --size 10 "$f" && mv "$f" "$f.part"; done
# remove the state, so the mirror doesn't think its already done.
# the parts need to hvae been deleted now
parts=""
for f in $files; do
if [ -e "$f.part" ]; then
echo "FAILED: $f.part existed";
parts="${parts} $f.part"
fi
done
The fix I committed included a test case, but here is a similar one that uses the sstream-mirror:
#!/bin/sh -e "examples/ foocloud/ streams/ v1/com. example. foovendor: released: download. json" mirror --max=1 "$dlfile" out.d
dlfile=
rm -Rf out.d
./tools/tenv ./bin/sstream-
# now truncate some of the files and rename to .part
files=$(find out.d -type f -name "*.tar.gz")
for f in $files; do truncate --size 10 "$f" && mv "$f" "$f.part"; done
# remove the state, so the mirror doesn't think its already done.
rm -Rf out.d/.data out.d/streams mirror -vv --max=1 "$dlfile" out.d
./tools/tenv ./bin/sstream-
# the parts need to hvae been deleted now
parts=""
for f in $files; do
if [ -e "$f.part" ]; then
echo "FAILED: $f.part existed";
parts="${parts} $f.part"
fi
done
[ -z "$parts" ] || exit 1