]> wimlib.net Git - wimlib/blobdiff - tests/test-imagex-ntfs
Fix tests (again)
[wimlib] / tests / test-imagex-ntfs
index 5e9a2a3f365ccec392cee1cef9fc3b4d119082eb..66c39de4846bb8d90060eec53b112bbb38427e8b 100755 (executable)
@@ -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