0

I have been trying to source this script from Xilinx install but it outputs an error.

source /opt/Xilinx/14.7/ISE_DS/settings32.csh

# Copyright (c) 1995-2013 Xilinx, Inc.  All rights reserved.

set SETTINGS_FILE=.settings32.csh
set XIL_SCRIPT_LOC="/opt/Xilinx/14.7/ISE_DS"
if ( $# != 0 ) then
   # The first argument is the location of Xilinx Installation.
   # Don't detect the installation location.
   set XIL_SCRIPT_LOC="$1"
else
   #  XIL_SCRIPT_LOC should point to script location
   set XIL_SCRIPT_LOC_TMP_UNI=`echo $_ | cut -d" " -f 2`
   set XIL_SCRIPT_LOC_TMP_UNI_TAIL=${XIL_SCRIPT_LOC_TMP_UNI:t}
   set XIL_SCRIPT_LOC_TMP_UNI=${XIL_SCRIPT_LOC_TMP_UNI:h}
   if ( "$XIL_SCRIPT_LOC_TMP_UNI" != "" ) then
      if ( "$XIL_SCRIPT_LOC_TMP_UNI" == "$XIL_SCRIPT_LOC_TMP_UNI_TAIL" ) then
         set XIL_SCRIPT_LOC_TMP_UNI="./"
      endif
      set XIL_SCRIPT_LOC_TMP_UNI=`readlink -f ${XIL_SCRIPT_LOC_TMP_UNI}`
      if ( $? == 0 ) then
         set XIL_SCRIPT_LOC=${XIL_SCRIPT_LOC_TMP_UNI}
      endif
   endif
   unset XIL_SCRIPT_LOC_TMP_UNI_TAIL
   unset XIL_SCRIPT_LOC_TMP_UNI
endif

set xlnxInstLocList=""

set xlnxInstLocList="${xlnxInstLocList} common"
set xlnxInstLocList="${xlnxInstLocList} EDK"
set xlnxInstLocList="${xlnxInstLocList} PlanAhead"
set xlnxInstLocList="${xlnxInstLocList} ISE"
set XIL_SCRIPT_LOC_TMP_UNI=${XIL_SCRIPT_LOC}
foreach i $( xlnxInstLocList )
        set d="${XIL_SCRIPT_LOC_TMP_UNI}/$i"
        set sfn="$d/$SETTINGS_FILE"
        if ( -e  "$sfn" ) then
                echo source "$sfn" "$d"
                source "$sfn" "$d"
        endif
end

bash: /opt/Xilinx/14.7/ISE_DS/settings32.csh: line 42: syntax error: unexpected end of file

Can someone see the error in the script?

newguy
  • 69
  • 1
  • 9
  • 1
    Are you trying to source a csh script with bash? They have a completely different syntax being that they are different shells... sourcing just runs the content of the file in your current shell. – 123 May 21 '17 at 18:56
  • It's what the installing intructions say... "C-shell 32 bit environment... source /opt/Xilinx/14.7/ISE_DS/settings32.csh" – newguy May 21 '17 at 18:57
  • 3
    bash is not a "C-shell", you need some variant of csh – Mat May 21 '17 at 18:58
  • THANK YOU. I finally understood – newguy May 21 '17 at 19:05
  • Most installations will have `csh` installed. At the bash prompt, just type-in `csh` (hit ), then run your `source` command. – cdarke May 21 '17 at 19:06

0 Answers0