请问下面的脚本错误是什么原因?

OOo,TeX,KO,ABI,GIMP,Picasa,ProE,QCAD,Inkscape,Kicad,Eagle
回复
chenjun77
帖子: 5
注册时间: 2009-03-19 0:40

请问下面的脚本错误是什么原因?

#1

帖子 chenjun77 » 2009-03-19 16:34

今天安装HSpice,根据提示先解压installer
在installer里运行

代码: 全选

sudo sh setup.sh
结果出现Syntax error: end of file unexpected (expecting "fi")的错误
初学者,对脚本不熟悉,请高人指点

setup.sh里面的内容

代码: 全选

#! /bin/csh -f

if ( ! $?DISPLAY ) then
    echo ""
    echo "Note: The DISPLAY environment variable is not set."
    echo "      Set this variable to proceed with the graphical"
    echo "      installation." 
    echo ""
    exit 1
endif


set cmdpath = "$0"
set cmd = "$cmdpath:t"

if ( "$cmd" == "$cmdpath" ) then
  set cddir = "."
else
  set cddir = "$cmdpath:h"
endif

set cddir_path = $cddir

if ( $cddir_path == "." ) then
  set cddir_path = `pwd`
endif

$cddir_path/installer -gui



chenjun77
帖子: 5
注册时间: 2009-03-19 0:40

Re: 请问下面的脚本错误是什么原因?

#2

帖子 chenjun77 » 2009-03-19 16:46

我把所有的endif都替换成if上面的问题倒是没有了
但是貌似出现了心得问题,提示说:

The DISPLAY environment variable is not set.
Set this variable to proceed with the graphical
installation."

是不是显卡的问题呢?
回复