blob: 2c8e6759ba2abd57572fc4498e86ed81221620f2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#!/bin/sh
set -e
TARDIR="@abs_top_srcdir@/tests/tar"
SHA512FILE="@abs_top_srcdir@/tests/tar/sqfs.sha512"
TAR2SQFS="@abs_top_builddir@/tar2sqfs"
if [ ! -f "$TAR2SQFS" -a -f "${TAR2SQFS}.exe" ]; then
TAR2SQFS="${TAR2SQFS}.exe"
fi
for filename in $(find "$TARDIR" -name "*.tar" | grep -v ".*/file-size/.*"); do
dir="$(dirname $filename | sed -n -e 's;.*/tests/;tests/;p')"
imgname="$dir/$(basename $filename .tar).sqfs"
mkdir -p "$dir"
"$TAR2SQFS" --defaults mtime=0 -c gzip -q "$imgname" < "$filename"
done
sha512sum -c "$SHA512FILE"
for filename in $(find "$TARDIR" -name "*.tar" | grep -v ".*/file-size/.*"); do
dir="$(dirname $filename | sed -n -e 's;.*/tests/;tests/;p')"
imgname="$dir/$(basename $filename .tar).sqfs"
rm "$imgname"
rmdir -p "$dir" || true
done
|