home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 3 / AACD03.BIN / AACD / Programming / sofa / archive / SmallEiffel.lha / SmallEiffel / misc / INSTALL.SH < prev    next >
Linux/UNIX/POSIX Shell Script  |  1999-06-05  |  2KB  |  69 lines

  1. #!/bin/sh
  2. #
  3. # To INSTALL SmallEiffel on UNIX like platforms (including LINUX).
  4. #
  5. # If you have the gcc compiler, simply run this script.
  6. #
  7. sed=${SmallEiffel:=1}
  8. if [ ${sed} = 1 ];  then 
  9.    echo Please set the environment Variable \'SmallEiffel\' with
  10.    echo the absolute path of file SmallEiffel/sys/system.se
  11.    exit 1
  12. fi
  13. if [ -d ${SmallEiffel} ]; then 
  14.    echo Since release -0.79 the value of the environment
  15.    echo variable SmallEiffel should be the absolute path of
  16.    echo file SmallEiffel/sys/system.se
  17.    echo Trying to fix this automatically.
  18.    SmallEiffel=${SmallEiffel}/sys/system.se
  19. fi
  20. if [ ! -f ${SmallEiffel} ]; then
  21.    echo File ${SmallEiffel} not found.
  22.    echo Please check the value of the environment Variable
  23.    echo \'SmallEiffel\' wich must be the absolute path of 
  24.    echo the file SmallEiffel/sys/system.se
  25.    exit 1
  26. fi
  27. SE=`dirname $SmallEiffel`
  28. SE=`dirname $SE`
  29. if [ -f ${SE} ]; then
  30.    echo ${SE} "not found."
  31.    exit 1
  32. fi
  33. cd ${SE}
  34. cd bin_c
  35. for fmake in *.make 
  36. do
  37.     chmod a+x ${fmake}
  38.     echo Running ${fmake} ...
  39.     ./${fmake}
  40.     cmd=`basename $fmake .make`
  41.     if [ -x ../bin/${cmd} ]; then
  42.         mv -f ../bin/${cmd} ../bin/${cmd}.old
  43.         fi
  44.     mv -f ${cmd} ../bin/${cmd}
  45.     /bin/rm -f ../bin/${cmd}.old
  46. done
  47. /bin/rm -f *.o
  48. echo Setting system name.
  49. /bin/rm -f ${SE}/sys/system.se
  50. echo "UNIX" > ${SE}/sys/system.se
  51. echo Writing default ${SE}/sys/loadpath.UNIX
  52. if [ Z`echo '\c'` = Z ]
  53.  then
  54.     echoopt=''
  55.     echosuf='\c'
  56.  else
  57.      echoopt='-n'
  58.      echosuf=''
  59. fi
  60. /bin/rm -f ${SE}/sys/loadpath.UNIX
  61. echo    "./"               > ${SE}/sys/loadpath.UNIX
  62. echo    "${SE}/lib_std/"  >> ${SE}/sys/loadpath.UNIX
  63. echo    "${SE}/lib_rand/" >> ${SE}/sys/loadpath.UNIX
  64. echo    "${SE}/lib_show/" >> ${SE}/sys/loadpath.UNIX
  65. echo $echoopt "${SE}/lib_se/$echosuf" >> ${SE}/sys/loadpath.UNIX
  66. echo Garbage Collector selection :
  67. ${SE}/misc/GC.SH
  68. echo Done.
  69.