-#!/bin/bash
+#!/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 $@"
}
cleanup() {
- rm -rf dir* tmp* *.wim *.swm
+ fusermount -u tmp &> /dev/null || true
+ rm -rf dir* tmp* *.wim *.swm &> /dev/null || true
}
cleanup