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