From: Michael Prokop Date: Tue, 23 Apr 2013 15:20:46 +0000 (+0200) Subject: Normalize temporary working directory to not fail with relative directory path X-Git-Tag: v0.13.6~1 X-Git-Url: http://git.grml.org/?p=grml2usb.git;a=commitdiff_plain;h=0ab2a7261eef1435cf5b0ce1180e826f4c663414 Normalize temporary working directory to not fail with relative directory path When invoking "grml2is -t tmpdir ..." then the kernel and initrd files receive a wrong leading directory path on the resulting ISO, leading to a broken ISO. Since specifying a relative path ("-t tmpdir" instead of "-t ${PWD}/tmpdir") should be possible as well let's just normalize it. --- diff --git a/grml2iso b/grml2iso index a2ef849..e84e267 100755 --- a/grml2iso +++ b/grml2iso @@ -91,7 +91,7 @@ Options: r) GRML2USB_OPTS+=(--remove-bootoption="$OPTARG");; p) GRML2USB_OPTS+=("$OPTARG");; s) URI="$OPTARG";; - t) WRKDIR="$OPTARG";; + t) WRKDIR="$(readlink -f "$OPTARG")";; ?) usage 2;; esac done diff --git a/grml2usb b/grml2usb index c696623..e2cffe8 100755 --- a/grml2usb +++ b/grml2usb @@ -1472,7 +1472,7 @@ def install(image, device): logging.info("Using %s as install base", image) else: logging.info("Using ISO %s", image) - iso_mountpoint = tempfile.mkdtemp(prefix="grml2usb", dir=options.tmpdir) + iso_mountpoint = tempfile.mkdtemp(prefix="grml2usb", dir=os.path.abspath(options.tmpdir)) register_tmpfile(iso_mountpoint) remove_image_mountpoint = True try: