X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=tests%2Ftest-imagex-ntfs;h=66c39de4846bb8d90060eec53b112bbb38427e8b;hb=39dc0c588a913e6bd3fbad5e9d6c6b40f2d61a5d;hp=5e9a2a3f365ccec392cee1cef9fc3b4d119082eb;hpb=8c77eaafc1aa3874b641470e8e9ecf50a5b50a55;p=wimlib diff --git a/tests/test-imagex-ntfs b/tests/test-imagex-ntfs index 5e9a2a3f..66c39de4 100755 --- a/tests/test-imagex-ntfs +++ b/tests/test-imagex-ntfs @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This script does some sanity testing of the 'imagex' program, specifically # checking the NTFS capture and apply features. @@ -9,8 +9,10 @@ # remain mounted. set -e -srcdir=`pwd` cd tests +srcdir="${srcdir:-.}/.." +srcdir="$(cd $srcdir; pwd)" +. "$srcdir/tests/tests-common.sh" imagex() { ../imagex $@ > /dev/null @@ -22,6 +24,7 @@ __do_unmount() { fi } + do_unmount() { if mountpoint $1 &> /dev/null; then __do_unmount $1