From: SourceForge.net <no...@so...> - 2004-12-18 21:40:23
|
Bugs item #1087569, was opened at 2004-12-18 17:18 Message generated for change (Settings changed) made by johan-boule You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1087569&group_id=2435 Category: msys Group: Known bugs Status: Open Resolution: None >Priority: 1 Submitted By: Johan Boulé (johan-boule) Assigned to: Earnie Boyd (earnie) Summary: /etc/fstab and path with spaces Initial Comment: Hi, I'm distributing a "dev-pack" (psycle project at sourceforge) which contains msys with a modified "startup script" that automatically produce a /etc/fstab file with the /home mount point set with the parent dir of the USERPROFILE env var. the problem is that the parent dir the of USERPROFILE is usually something like "x:/documents and settings", i.e. the path contains spaces. i've tried quoting with " or ', but it seems the syntax is rejected. Alternatively, is there a way with cmd.exe to obtain the "8.3" alias for a path? Regards, Johan. ---------------------------------------------------------------------- Comment By: Johan Boulé (johan-boule) Date: 2004-12-18 22:38 Message: Logged In: YES user_id=96100 On a side note, i see that msys\bin is mounted on /usr/bin, but since msys is already mouned on /usr, it's useless. ---------------------------------------------------------------------- Comment By: Johan Boulé (johan-boule) Date: 2004-12-18 22:31 Message: Logged In: YES user_id=96100 Ok, i found a work around to get the 8.3 alias of the dir.. it's quite a horrible cmd.exe's shell code: pushd "%USERPROFILE%" || goto :failed cd .. || goto :failed for %%X in ("%CD%") do set X=%%~sX|| goto :failed echo %X% /home >> "%~d0%~p0msys\etc\fstab" || goto :failed set X= popd || goto :failed the %~sX converts the content of the X var to 8.3 style alias, and since this feature only works for 'for' variables, we need to use a 'for' command... ugly ugly :/ ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1087569&group_id=2435 |