-#!/bin/bash
+#!/usr/bin/env bash
# This script does some sanity testing of the 'imagex' program, specifically
# checking the NTFS capture and apply features.
# remain mounted.
set -e
-srcdir=${srcdir:-.}
-srcdir=`realpath $srcdir`
cd tests
+srcdir="${srcdir:-.}/.."
+srcdir="$(cd $srcdir; pwd)"
+. "$srcdir/tests/tests-common.sh"
imagex() {
../imagex $@ > /dev/null
}
__do_unmount() {
- if ! fusermount -u $1; then
+ if ! fusermount -z -u $1; then
error "Failed to unmount \"$1\""
fi
}
+
do_unmount() {
if mountpoint $1 &> /dev/null; then
__do_unmount $1