Blame test.sh

576e4a
#!/bin/bash
576e4a
576e4a
set -e
576e4a
576e4a
[ -n "$1" ] || ( echo "file arg required"; false )
576e4a
576e4a
./build.sh
576e4a
576e4a
576e4a
echo "arch $1 -> $1.ar"
576e4a
./arch deflate "$1" "$1.ar"
576e4a
echo "archived"
576e4a
576e4a
echo "extract $1.ar -> $1.copy"
576e4a
./arch inflate "$1.ar" "$1.copy"
576e4a
echo "extracted"
576e4a
576e4a
576e4a
echo "compare with original"
576e4a
cmp "$1" "$1.copy" || ( echo "ERROR: files differ"; false )
576e4a
echo "files are equal"
576e4a
576e4a
echo "done"