Directory Fortran 90设置目录
我正在开发一个名为GULP的基于Fortran 90的程序,我正试图通过将.F文件直接发送到我的Force 2.0编译器来编辑它。我想知道我是否使用了正确的语法。我在Darwin部分插入了我认为该目录的内容(我使用的是Windows7)。Windows说文件路径是: C:\ProgramFiles(x86)\Force 2.0Directory Fortran 90设置目录,directory,fortran,Directory,Fortran,我正在开发一个名为GULP的基于Fortran 90的程序,我正试图通过将.F文件直接发送到我的Force 2.0编译器来编辑它。我想知道我是否使用了正确的语法。我在Darwin部分插入了我认为该目录的内容(我使用的是Windows7)。Windows说文件路径是: C:\ProgramFiles(x86)\Force 2.0 makedir() { if [ ! -d "$dir" ] then mkdir "$dir" fi cd $dir
makedir()
{
if [ ! -d "$dir" ]
then
mkdir "$dir"
fi
cd $dir
}
debug=
if [ "$1" = "-debug" ]
then
debug="_DEBUG"
shift
fi
os=`uname -s`
case $os in
#
# Mac OS-X using Absoft compiler
#
Darwin) dir="\Program Files (x86)\Force 2.0"
makedir
if [ "$debug" = "" ]
then
echo 'OPT=-O' > makefile
echo 'OPT1=-O' >> makefile
echo 'BAGGER=' >> makefile
else
echo 'OPT=' > makefile
echo 'BAGGER=-g ' >> makefile
fi
target=${1}_
echo 'RUNF90=force 2.0' >> makefile
echo 'FFLAGS=-I.. -DLINUX ' >> makefile
echo 'LIBS=' >> makefile
echo 'GULPENV=' >> makefile
echo 'DEFS=-DLINUX' >> makefile
;;
你有什么问题?你收到错误信息了吗?您对上面的脚本做了什么?问题可能是您没有双引号引用
$dir
,请尝试使用cd“$dir”