]> wimlib.net Git - wimlib/commitdiff
make-windows-release: allow *.cmd files to operate from paths w/ spaces
authorMike Swanson <mikeonthecomputer@gmail.com>
Tue, 16 Feb 2016 02:43:15 +0000 (18:43 -0800)
committerEric Biggers <ebiggers3@gmail.com>
Tue, 16 Feb 2016 05:53:11 +0000 (23:53 -0600)
If wimlib is unpacked in a path with spaces in it, such as
"C:\Documents and Settings" (default user location on Windows XP), the
shell will prompt back with a message like:

    'C:\Documents' is not recognized as an internal or external command,
    operable program or batch file.

Simply using double quotes as a guard resolves this and allows it to work.

tools/make-windows-release

index 3e3546d195150d603ae5e3ea2d4f4fc0dcd68ad9..1b80d31529eb72fda5ea713025ff17f2747b7fa4 100755 (executable)
@@ -112,7 +112,7 @@ for fil in ./doc/man1/wimlib-imagex-*.1; do
 
        sed 's/$/\r/g' > ${DESTDIR}/wim${cmd}.cmd <<- EOF
                @echo off
-               %~dp0\\wimlib-imagex $cmd %*
+               "%~dp0\\wimlib-imagex" $cmd %*
        EOF
        chmod +x ${DESTDIR}/wim${cmd}.cmd
 done