方法 1:
=====================
export ALT_BOOTDIR=`cygpath -s -m "F:/Program Files/Java/jdk1.5.0_14"`
export ALT_BINARY_PLUGS_PATH=F:/JDKSource/jdk-6-ea-plug-b08-windows-i586-26_mar_2008/openjdk-binary-plugs
export ALT_MSVCRT_DLL_PATH=`cygpath -s -m "C:/WINDOWS/system32"`
export ALT_MSVCR71_DLL_PATH=C:/WINDOWS/system32
export DXSDK_DIR=`cygpath -s -m "H:/Program Files/Microsoft DirectX SDK (February 2007)"`
export ALT_COMPILER_PATH=`cygpath -s -m "H:\Program Files\Microsoft Visual Studio 8\VC\bin"`
方法 2:
====================
It seems to be a quoting problem. This is what I was doing:
$ ttt="$(cygpath -u "$JAVA_HOME")"
$ echo $ttt
/cygdrive/c/Program Files/Java/jdk1.5.0_10
$ cd $ttt
bash: cd: /cygdrive/c/Program: No such file or directory
$ cd "$ttt"
$pwd
/cygdrive/c/Program Files/Java/jdk1.5.0_10
Is is possible to setup the variable to not require the double quotes?
Since my other method doesn't require the double quotes, it would
make the scripting much easier. I wouldn't need to keep track of which
variables I had to double quote.
$ tttt="$(cygpath -u "$(cygpath -m -s "$JAVA_HOME")")"
$ echo $tttt
/cygdrive/c/PROGRA~1/Java
$ cd $tttt
$ pwd
/cygdrive/c/PROGRA~1/Java
Notice that I can use $tttt directly without have to use the double quote.
沒有留言:
張貼留言