-srcdir="${srcdir:-.}/.."
-srcdir="$(cd $srcdir; pwd)"
-
-if stat -c %i . ; then
+if stat -c %i . &> /dev/null ; then
BSD_STAT=0
else
BSD_STAT=1
fi
-get_inode_number()
+get_inode_number()
{
if [ "$BSD_STAT" -eq 1 ]; then
stat -f %i "$1"
stat -c %s "$1"
fi
}
+
+imagex()
+{
+ echo "imagex $@"
+ if [[ $1 == info || $1 == mountrw ]]; then
+ ../../wimlib-imagex "$@"
+ else
+ ../../wimlib-imagex "$@" > /dev/null
+ fi
+}
+
+imagex_raw()
+{
+ ../../wimlib-imagex "$@"
+}
+
+wim_ctype()
+{
+ imagex info $1 | grep Compression | awk '{print $2}'
+}
+
+default_cleanup()
+{
+ rm -rf $TEST_SUBDIR
+}
+
+error()
+{
+ echo "****************************************************************"
+ echo " Test failure "
+ echo $*
+ echo "****************************************************************"
+ exit 1
+}