ndnd
October 6th, 2013, 04:36 PM
Hello all,
I have ubunutu 12.10 LTS version.
I am trying to run a script posted below and get an error when it reads the line at the end. I am not able to understand why (I have posted the error below)
#!/bin/csh -f
#
#
#
if ($?TARGET != 0) goto RUN
set uname=`uname`
switch($uname)
case "SunOS":
if (-x /bin/isainfo) then
set osbits=`/bin/isainfo -k`
if ( $osbits == "sparcv9" ) then
setenv TARGET SUN64
goto RUN
endif
endif
setenv TARGET SUN
goto RUN
breaksw
case "Linux":
set machine=`uname -m`
if ( $machine == "ia64" ) then
setenv TARGET PC_LINUX64
set processor=`uname -p`
goto RUN
endif
if ( $machine == "x86_64" ) then
setenv TARGET AMD_LINUX64
goto RUN
endif
setenv TARGET PC_LINUX
goto RUN
endsw
case "Darwin":
set machine=`uname -m`
if ( "$machine" == "x86_64" ) then
setenv TARGET MAC_I64
goto RUN
endif
if ( "$machine" == "i386" ) then
set rev=`uname -r`
@ rmajor = `echo $rev | awk -F. '{print $1}'`
if ( $rmajor < 9) then
setenv TARGET MAC_I32
goto RUN
else
set bits=`sysctl -n hw.cachelinesize`
if ( "$bits" == "64" ) \
setenv TARGET MAC_I64
set OVERRIDE=1
goto RUN
endif
setenv TARGET MAC_I32
goto RUN
endif
endif
setenv TARGET MAC_I32
goto RUN
breaksw
RUN:
set OVERRIDE=0
if ($1 == "SUN" || $1 == "-SUN") then
setenv TARGET SUN
set OVERRIDE=1
shift
endif
if ($1 == "PC_LINUX" || $1 == "-PC_LINUX") then
setenv TARGET PC_LINUX
set OVERRIDE=1
shift
endif
if ($1 == "MAC_I64" || $1 == "-MAC_I64") then
setenv TARGET MAC_I64
set OVERRIDE=1
shift
endif
if ($1 == "MAC_I32" || $1 == "-MAC_I32") then
setenv TARGET MAC_I32
set OVERRIDE=1
shift
endif
set d=`dirname $0`
cd $d
./.Installers/Installer_$TARGET
./.Installers/Installer_AMD_LINUX64: Command not found.
If it helps the name of the file I am trying to run is 'Installer'
Any help in this matter would be appreciated.
I have ubunutu 12.10 LTS version.
I am trying to run a script posted below and get an error when it reads the line at the end. I am not able to understand why (I have posted the error below)
#!/bin/csh -f
#
#
#
if ($?TARGET != 0) goto RUN
set uname=`uname`
switch($uname)
case "SunOS":
if (-x /bin/isainfo) then
set osbits=`/bin/isainfo -k`
if ( $osbits == "sparcv9" ) then
setenv TARGET SUN64
goto RUN
endif
endif
setenv TARGET SUN
goto RUN
breaksw
case "Linux":
set machine=`uname -m`
if ( $machine == "ia64" ) then
setenv TARGET PC_LINUX64
set processor=`uname -p`
goto RUN
endif
if ( $machine == "x86_64" ) then
setenv TARGET AMD_LINUX64
goto RUN
endif
setenv TARGET PC_LINUX
goto RUN
endsw
case "Darwin":
set machine=`uname -m`
if ( "$machine" == "x86_64" ) then
setenv TARGET MAC_I64
goto RUN
endif
if ( "$machine" == "i386" ) then
set rev=`uname -r`
@ rmajor = `echo $rev | awk -F. '{print $1}'`
if ( $rmajor < 9) then
setenv TARGET MAC_I32
goto RUN
else
set bits=`sysctl -n hw.cachelinesize`
if ( "$bits" == "64" ) \
setenv TARGET MAC_I64
set OVERRIDE=1
goto RUN
endif
setenv TARGET MAC_I32
goto RUN
endif
endif
setenv TARGET MAC_I32
goto RUN
breaksw
RUN:
set OVERRIDE=0
if ($1 == "SUN" || $1 == "-SUN") then
setenv TARGET SUN
set OVERRIDE=1
shift
endif
if ($1 == "PC_LINUX" || $1 == "-PC_LINUX") then
setenv TARGET PC_LINUX
set OVERRIDE=1
shift
endif
if ($1 == "MAC_I64" || $1 == "-MAC_I64") then
setenv TARGET MAC_I64
set OVERRIDE=1
shift
endif
if ($1 == "MAC_I32" || $1 == "-MAC_I32") then
setenv TARGET MAC_I32
set OVERRIDE=1
shift
endif
set d=`dirname $0`
cd $d
./.Installers/Installer_$TARGET
./.Installers/Installer_AMD_LINUX64: Command not found.
If it helps the name of the file I am trying to run is 'Installer'
Any help in this matter would be appreciated.