check -o redirected and piped output
This commit is contained in:
parent
60cfbaa326
commit
c35a372c88
@ -166,6 +166,28 @@ ln "$on_disk"/file_1 "$on_disk"/file_1_link_b || exit 1
|
||||
ln "$on_disk"/file_2 "$on_disk"/file_2_link_a || exit 1
|
||||
ls -l "$on_disk"/*
|
||||
|
||||
is_valid_iso9660() {
|
||||
ISOfile="$1"
|
||||
if [ ! -f ${ISOfile} ]; then
|
||||
failure=1
|
||||
printf "=== FAIL Not found: ${ISOfile}\n"
|
||||
fi
|
||||
if file ${ISOfile} | grep -P "ISO\s+9660\s+CD-ROM\s+filesystem\s+data" >/dev/null 2>&1; then
|
||||
printf "=== ${ISOfile} OK\n"
|
||||
else
|
||||
failure=1
|
||||
printf "=== FAIL: ${ISOfile} does not look like ISO 9660 filesystem data\n"
|
||||
fi
|
||||
}
|
||||
|
||||
echo "=== Producing simple images via -o, redirect, and pipe" >&2
|
||||
"$xorriso" -as mkisofs "$on_disk" -o "$workdir"/image_minus_o.iso
|
||||
is_valid_iso9660 "$workdir"/image_minus_o.iso
|
||||
"$xorriso" -as mkisofs "$on_disk" > "$workdir"/image_redirected.iso
|
||||
is_valid_iso9660 "$workdir"/image_redirected.iso
|
||||
"$xorriso" -as mkisofs "$on_disk" | cat > "$workdir"/image_piped.iso
|
||||
is_valid_iso9660 "$workdir"/image_piped.iso
|
||||
|
||||
|
||||
echo "=== Producing simple image" >&2
|
||||
"$xorriso" \
|
||||
|
Loading…
Reference in New Issue
Block a user