]> wimlib.net Git - wimlib/blobdiff - tests/test-imagex-mount
Various portability fixes
[wimlib] / tests / test-imagex-mount
index 0e94af8124a49a531b34918f8b054a3748ae6962..4f6d1c95e58521ae0570339abdf65e2c5b207646 100755 (executable)
@@ -1,10 +1,11 @@
-#!/bin/sh
+#!/usr/bin/env bash
 
 # Test WIM mounting
 
 set -e
-srcdir=`pwd`
 cd tests
+srcdir="${srcdir:-.}/.."
+srcdir="$(cd $srcdir; pwd)"
 
 if [ ! -r /dev/fuse ]; then
        echo "WARNING: /dev/fuse is not readable."
@@ -238,7 +239,7 @@ do_test() {
        fi
 
        cd tmp.mnt
-       if ! tar xf ../test.tar; then
+       if ! tar xf ../test.tar --no-same-owner; then
                error "Failed to untar archive on read-write mounted WIM"
        fi
        cd ..
@@ -253,7 +254,7 @@ do_test() {
        fi
 
        cd tmp.mnt
-       if ! tar xf ../test.tar; then
+       if ! tar xf ../test.tar --no-same-owner; then
                error "Failed to untar archive on read-write mounted WIM"
        fi
        cd ..