Salut a tous !
Je dois installer un programme (IRAF) et puor cela utiliser un fichier csh mais ma console me renvoit l'erreur suivante :
:bash: irafuser.csh: line 11: syntax error near unexpected token `else'
:bash: irafuser.csh: line 11: `else if (-f /etc/yellowdog-release || "`uname -m`" == "ppc") then'
Voici le fichier qui pose probleme :
Code:export OS_MACH= `uname -s | tr '[A-Z]' '[a-z]' | cut -c1-6` if (-f /etc/redhat-release) then if (`uname -m` == "ppc") then export MACH= linuxppc else export MACH= redhat endif else if (-f /etc/yellowdog-release || "`uname -m`" == "ppc") then export MACH= linuxppc else export MACH =`uname -s | tr '[A-Z]' '[a-z]'` endif if ($MACH == "darwin") then # Let the IRAFARCH override the machine to support cross compilation. if ($?IRAFARCH) then if ("$IRAFARCH" == "macosx") then export MACH= macosx else if ("$IRAFARCH" == "macintel") then export MACH= macintel endif else if ("`uname -m`" == "i386") then export MACH= macintel export IRAFARCH= macintel else export MACH= macosx export IRAFARCH= macosx endif endif else if ($OS_MACH == "cygwin") then export MACH= cygwin endif export hostid= unix export host= ${iraf}unix/ export hlib= ${iraf}unix/hlib/ export hbin= ${iraf}unix/bin.$MACH/ export tmp= /tmp/ # Default to GCC for compilation. export CC= gcc export F77= $hlib/f77.sh export F2C= $hbin/f2c.e export RANLIB= ranlib switch ($MACH) case freebsd: export HSI_CF= "-O -DBSD -DPOSIX -w -Wunused" export HSI_XF= "-Inolibc -/DBSD -w -/Wunused" export HSI_FF= "-O" export HSI_LF= "-static" export HSI_F77LIBS= "" export HSI_LFLAGS= "" export HSI_OSLIBS= "-lcompat" set mkzflags = "'lflags=-z' -/static" breaksw case macosx: export CC= cc export CC_f2c= cc export F2C= $hbin/f2c.e export HSI_CF= "-O -DMACOSX -w -Wunused -arch ppc" export HSI_XF= "-Inolibc -/DMACOSX -w -/Wunused" if (`uname -r` == "5.5") then export HSI_CF = "$HSI_CF -DOLD_MACOSX" export HSI_XF = "$HSI_XF -DOLD_MACOSX" endif export HSI_FF= "-O -arch ppc" export HSI_LF= "-arch ppc" export HSI_F77LIBS= "" export HSI_LFLAGS= "" export HSI_OSLIBS= "" set mkzflags = "'lflags=-z'" breaksw case macintel: export CC= cc #export F77 gcc export CC_f2c= cc export F2C= $hbin/f2c.e export HSI_CF= "-O -DMACOSX -DMACINTEL -w -Wunused -arch i386" export HSI_FF= "-O -arch i386" export HSI_LF= "-arch i386" export HSI_XF= "-Inolibc -/DMACOSX -/DMACINTEL -w -/Wunused" export HSI_F77LIBS= "" export HSI_LFLAGS= "" if ($?IRAF_UNIBIN) then export HSI_CF= "$HSI_CF -arch ppc -arch i386" export HSI_FF= "$HSI_FF -arch ppc -arch i386" export HSI_LF= "$HSI_LF" export HSI_LFLAGS= "$HSI_LFLAGS -arch ppc -arch i386" endif export HSI_OSLIBS= "" set mkzflags = "'lflags=-z'" breaksw case linux: export HSI_CF "-O -DLINUX -DPOSIX -DSYSV -w -Wunused" export HSI_XF "-Inolibc -w -/Wunused" export HSI_FF "-O" export HSI_LF "" export HSI_F77LIBS "" export HSI_LFLAGS "" export HSI_OSLIBS "" set mkzflags = "'lflags=-Nxz -/Wl,-Bstatic'" breaksw case redhat: export HSI_CF= "-O -DLINUX -DREDHAT -DPOSIX -DSYSV -w -Wunused" export HSI_XF= "-Inolibc -w -/Wunused" export HSI_FF= "-O" #export HSI_LF "-Wl,-Bstatic" export HSI_L=F "" export HSI_F77LIBS= "" export HSI_LFLAGS= "" export HSI_OSLIBS= "" set mkzflags = "'lflags=-Nxz -/Wl,-Bstatic'" breaksw case suse: export HSI_CF= "-O -DSUSE -DLINUX -DPOSIX -DSYSV -w -Wunused" export HSI_XF= "-Inolibc -w -/Wunused" export HSI_FF= "-O" #export HSI_LF "-Wl,-Bstatic -specs=/iraf/iraf//unix/bin.suse/gcc-specs" export HSI_LF= "-specs=/iraf/iraf//unix/bin.suse/gcc-specs" export HSI_F77LIBS= "" export HSI_LFLAGS= "" export HSI_OSLIBS= "" set mkzflags = "'lflags=-Nxz -/Wl,-Bstatic'" breaksw case sunos: export HSI_CF= "-O -DSOLARIS -DX86 -DPOSIX -DSYSV -w -Wunused" export HSI_XF ="-Inolibc -w -/Wunused" export HSI_FF= "-O" #export HSI_LF "-t -Wl,-Bstatic" #export HSI_LFLAGS "-t -Wl,-Bstatic" #export HSI_OSLIBS \ # "-lsocket -lnsl -lintl -Wl,-Bdynamic -ldl -Wl,-Bstatic -lelf" export HSI_LF= "-t" export HSI_F77LIBS= "" export HSI_LFLAGS= "-t" export HSI_OSLIBS= "-lsocket -lnsl -lintl -ldl -lelf" set mkzflags = "'lflags=-Nxz -/Wl,-Bstatic'" breaksw case linuxppc: export HSI_CF= "-O -DLINUX -DREDHAT -DLINUXPPC -DPOSIX -DSYSV -w -Wunused" export HSI_XF= "-Inolibc -w -/Wunused" export HSI_FF= "-O" export HSI_LF= "" export HSI_F77LIBS= "" export HSI_LFLAGS= "" export HSI_OSLIBS= "" set mkzflags = "'lflags=-Nxz -/Wl,-Bstatic'" breaksw case cygwin: export HSI_CF= "-O -DCYGWIN -DLINUX -DREDHAT -DPOSIX -DSYSV -w -Wunused" export HSI_XF= "-Inolibc -w -/Wunused -/DCYGWIN" export HSI_FF= "-O" #export HSI_LF "-Wl,-Bstatic" export HSI_LF= "" export HSI_F77LIBS= "" export HSI_LFLAGS= "" export HSI_OSLIBS= "${iraf}unix/bin.cygwin/libcompat.a" set mkzflags = "'lflags=-Nxz -/Wl,-Bstatic'" breaksw default: echo 'Warning in hlib$irafuser.csh: unknown platform '"$MACH" exit 1 breaksw endsw # The following determines whether or not the VOS is used for filename mapping. if (-f ${iraf}lib/libsys.a) then export HSI_LIBS\ "${hlib}libboot.a ${iraf}lib/libsys.a ${iraf}lib/libvops.a ${hlib}libos.a" else export HSI_CF= "$HSI_CF -DNOVOS" export HSI_LIBS= "${hlib}libboot.a ${hlib}libos.a" endif export HSI_LIBS= "$HSI_LIBS $HSI_OSLIBS" alias mkiraf ${hlib}mkiraf.csh alias mkmlist ${hlib}mkmlist.csh alias mkz ${hbin}mkpkg.e "$mkzflags" alias edsym ${hbin}edsym.e alias generic ${hbin}generic.e alias mkpkg ${hbin}mkpkg.e alias rmbin ${hbin}rmbin.e alias rmfiles ${hbin}rmfiles.e alias rtar ${hbin}rtar.e alias wtar ${hbin}wtar.e alias xc ${hbin}xc.e alias xyacc ${hbin}xyacc.e export OS_MACH= `uname -s | tr '[A-Z]' '[a-z]' | cut -c1-6` if (-f /etc/redhat-release) then if (`uname -m` == "ppc") then export MACH= linuxppc else export MACH= redhat endif else if (-f /etc/yellowdog-release || "`uname -m`" == "ppc") then export MACH= linuxppc else export MACH =`uname -s | tr '[A-Z]' '[a-z]'` endif if ($MACH == "darwin") then # Let the IRAFARCH override the machine to support cross compilation. if ($?IRAFARCH) then if ("$IRAFARCH" == "macosx") then export MACH= macosx else if ("$IRAFARCH" == "macintel") then export MACH= macintel endif else if ("`uname -m`" == "i386") then export MACH= macintel export IRAFARCH= macintel else export MACH= macosx export IRAFARCH= macosx endif endif else if ($OS_MACH == "cygwin") then export MACH= cygwin endif export hostid= unix export host= ${iraf}unix/ export hlib= ${iraf}unix/hlib/ export hbin= ${iraf}unix/bin.$MACH/ export tmp= /tmp/ # Default to GCC for compilation. export CC= gcc export F77= $hlib/f77.sh export F2C= $hbin/f2c.e export RANLIB= ranlib switch ($MACH) case freebsd: export HSI_CF= "-O -DBSD -DPOSIX -w -Wunused" export HSI_XF= "-Inolibc -/DBSD -w -/Wunused" export HSI_FF= "-O" export HSI_LF= "-static" export HSI_F77LIBS= "" export HSI_LFLAGS= "" export HSI_OSLIBS= "-lcompat" set mkzflags = "'lflags=-z' -/static" breaksw case macosx: export CC= cc export CC_f2c= cc export F2C= $hbin/f2c.e export HSI_CF= "-O -DMACOSX -w -Wunused -arch ppc" export HSI_XF= "-Inolibc -/DMACOSX -w -/Wunused" if (`uname -r` == "5.5") then export HSI_CF = "$HSI_CF -DOLD_MACOSX" export HSI_XF = "$HSI_XF -DOLD_MACOSX" endif export HSI_FF= "-O -arch ppc" export HSI_LF= "-arch ppc" export HSI_F77LIBS= "" export HSI_LFLAGS= "" export HSI_OSLIBS= "" set mkzflags = "'lflags=-z'" breaksw case macintel: export CC= cc #export F77 gcc export CC_f2c= cc export F2C= $hbin/f2c.e export HSI_CF= "-O -DMACOSX -DMACINTEL -w -Wunused -arch i386" export HSI_FF= "-O -arch i386" export HSI_LF= "-arch i386" export HSI_XF= "-Inolibc -/DMACOSX -/DMACINTEL -w -/Wunused" export HSI_F77LIBS= "" export HSI_LFLAGS= "" if ($?IRAF_UNIBIN) then export HSI_CF= "$HSI_CF -arch ppc -arch i386" export HSI_FF= "$HSI_FF -arch ppc -arch i386" export HSI_LF= "$HSI_LF" export HSI_LFLAGS= "$HSI_LFLAGS -arch ppc -arch i386" endif export HSI_OSLIBS= "" set mkzflags = "'lflags=-z'" breaksw case linux: export HSI_CF "-O -DLINUX -DPOSIX -DSYSV -w -Wunused" export HSI_XF "-Inolibc -w -/Wunused" export HSI_FF "-O" export HSI_LF "" export HSI_F77LIBS "" export HSI_LFLAGS "" export HSI_OSLIBS "" set mkzflags = "'lflags=-Nxz -/Wl,-Bstatic'" breaksw case redhat: export HSI_CF= "-O -DLINUX -DREDHAT -DPOSIX -DSYSV -w -Wunused" export HSI_XF= "-Inolibc -w -/Wunused" export HSI_FF= "-O" #export HSI_LF "-Wl,-Bstatic" export HSI_L=F "" export HSI_F77LIBS= "" export HSI_LFLAGS= "" export HSI_OSLIBS= "" set mkzflags = "'lflags=-Nxz -/Wl,-Bstatic'" breaksw case suse: export HSI_CF= "-O -DSUSE -DLINUX -DPOSIX -DSYSV -w -Wunused" export HSI_XF= "-Inolibc -w -/Wunused" export HSI_FF= "-O" #export HSI_LF "-Wl,-Bstatic -specs=/iraf/iraf//unix/bin.suse/gcc-specs" export HSI_LF= "-specs=/iraf/iraf//unix/bin.suse/gcc-specs" export HSI_F77LIBS= "" export HSI_LFLAGS= "" export HSI_OSLIBS= "" set mkzflags = "'lflags=-Nxz -/Wl,-Bstatic'" breaksw case sunos: export HSI_CF= "-O -DSOLARIS -DX86 -DPOSIX -DSYSV -w -Wunused" export HSI_XF ="-Inolibc -w -/Wunused" export HSI_FF= "-O" #export HSI_LF "-t -Wl,-Bstatic" #export HSI_LFLAGS "-t -Wl,-Bstatic" #export HSI_OSLIBS \ # "-lsocket -lnsl -lintl -Wl,-Bdynamic -ldl -Wl,-Bstatic -lelf" export HSI_LF= "-t" export HSI_F77LIBS= "" export HSI_LFLAGS= "-t" export HSI_OSLIBS= "-lsocket -lnsl -lintl -ldl -lelf" set mkzflags = "'lflags=-Nxz -/Wl,-Bstatic'" breaksw case linuxppc: export HSI_CF= "-O -DLINUX -DREDHAT -DLINUXPPC -DPOSIX -DSYSV -w -Wunused" export HSI_XF= "-Inolibc -w -/Wunused" export HSI_FF= "-O" export HSI_LF= "" export HSI_F77LIBS= "" export HSI_LFLAGS= "" export HSI_OSLIBS= "" set mkzflags = "'lflags=-Nxz -/Wl,-Bstatic'" breaksw case cygwin: export HSI_CF= "-O -DCYGWIN -DLINUX -DREDHAT -DPOSIX -DSYSV -w -Wunused" export HSI_XF= "-Inolibc -w -/Wunused -/DCYGWIN" export HSI_FF= "-O" #export HSI_LF "-Wl,-Bstatic" export HSI_LF= "" export HSI_F77LIBS= "" export HSI_LFLAGS= "" export HSI_OSLIBS= "${iraf}unix/bin.cygwin/libcompat.a" set mkzflags = "'lflags=-Nxz -/Wl,-Bstatic'" breaksw default: echo 'Warning in hlib$irafuser.csh: unknown platform '"$MACH" exit 1 breaksw endsw # The following determines whether or not the VOS is used for filename mapping. if (-f ${iraf}lib/libsys.a) then export HSI_LIBS\ "${hlib}libboot.a ${iraf}lib/libsys.a ${iraf}lib/libvops.a ${hlib}libos.a" else export HSI_CF= "$HSI_CF -DNOVOS" export HSI_LIBS= "${hlib}libboot.a ${hlib}libos.a" endif export HSI_LIBS= "$HSI_LIBS $HSI_OSLIBS" alias mkiraf ${hlib}mkiraf.csh alias mkmlist ${hlib}mkmlist.csh alias mkz ${hbin}mkpkg.e "$mkzflags" alias edsym ${hbin}edsym.e alias generic ${hbin}generic.e alias mkpkg ${hbin}mkpkg.e alias rmbin ${hbin}rmbin.e alias rmfiles ${hbin}rmfiles.e alias rtar ${hbin}rtar.e alias wtar ${hbin}wtar.e alias xc ${hbin}xc.e alias xyacc ${hbin}xyacc.e
(J'ai deja change tous lesenCode:setenv a b.)Code:export a=b
Y'a-t-il une solution pour corriger cette erreur ?
Merci
-----