]> wimlib.net Git - wimlib/blobdiff - tests/test-imagex
Fix sequential extraction, and include progress info
[wimlib] / tests / test-imagex
index 00bf0044711888ecd040889b7fd0239e3d40fa5f..0ac5fc3592672214aa6502a2fe855ae45be59b3c 100755 (executable)
@@ -1,11 +1,12 @@
-#!/bin/sh
+#!/usr/bin/env bash
 
 # This script does some sanity testing of the 'imagex' program.  It by no means
 # tests every aspect of wimlib comprehensively.
 
 set -e
-srcdir=`pwd`
 cd tests
+srcdir="${srcdir:-.}/.."
+srcdir="$(cd $srcdir; pwd)"
 
 imagex() {
        echo "imagex $@"
@@ -18,7 +19,8 @@ imagex_info() {
 }
 
 cleanup() {
-       rm -rf dir* tmp* *.wim *.swm
+       fusermount -u tmp &> /dev/null || true
+       rm -rf dir* tmp* *.wim *.swm &> /dev/null || true
 }
 cleanup