Subversion Repositories pentevo

Rev

Blame | Last modification | View Log | Download | RSS feed | ?url?

  1. #!/bin/sh
  2. #set -v
  3.  
  4. # assure we don't copy to absolute paths / root dir if $INSTROOT is not set:
  5.  
  6. if [ "${INSTROOT}" != "" ]; then
  7.   INSTROOT=${INSTROOT}/
  8. fi
  9. BINPATH=${INSTROOT}$1
  10. INCPATH=${INSTROOT}$2
  11. MANPATH=${INSTROOT}$3
  12. LIBPATH=${INSTROOT}$4
  13. DOCPATH=${INSTROOT}$5
  14.  
  15. # this is not a perfect solution, but I don't know a better one at the moment:
  16.  
  17. if [ -f /usr/X11R6/bin/mkdirhier ] ; then
  18.   MKDIRHIER="/usr/X11R6/bin/mkdirhier"
  19. else
  20.   if [ -f /usr/bin/X11/mkdirhier ] ; then
  21.     MKDIRHIER="/usr/bin/X11/mkdirhier"
  22.   else
  23.     MKDIRHIER="mkdir -p"
  24.   fi
  25. fi
  26.  
  27. echo "Installing files:"
  28.  
  29. if [ "${BINPATH}" != "" ]; then
  30.  ${MKDIRHIER} ${BINPATH}
  31.  chmod 755 ${BINPATH}
  32.  for i in asl plist alink pbind p2hex p2bin; do
  33.   #echo copy ${TARG_OBJDIR}$i${TARG_EXEXTENSION} to ${BINPATH}/$i${TARG_EXEXTENSION} ...
  34.   strip ${TARG_OBJDIR}$i${TARG_EXEXTENSION}
  35.   if cp ${TARG_OBJDIR}$i${TARG_EXEXTENSION} ${BINPATH}; then
  36.    chmod 755 ${BINPATH}/$i${TARG_EXEXTENSION}
  37.   fi
  38.  done
  39. fi
  40.  
  41. if test "${TARG_EXEXTENSION}" = ".exe"; then
  42.   if test "${OBJDIR}" = ""; then
  43.     CPINC=./unumlaut
  44.   else
  45.     CPINC=${OBJDIR}unumlaut
  46.   fi
  47. else
  48.   CPINC=cp
  49. fi
  50.  
  51. if [ "${INCPATH}" != "" ]; then
  52.  ${MKDIRHIER} ${INCPATH}
  53.  chmod 755 ${INCPATH}
  54.  for path in . avr s12z s12z/vh s12z/vc s12z/vca coldfire st6 st7 stm8 stm8/stm8s stm8/stm8l stm8/stm8af stm8/stm8al stm8/stm8t z8 pdk; do
  55.   if [ "$path" != "." ]; then
  56.    mkdir ${INCPATH}/${path}
  57.    chmod 755 ${INCPATH}/${path}
  58.   fi
  59.   for file in include/${path}/*.inc; do
  60.    base=`basename ${file}`
  61.    #echo copy ${file} to ${INCPATH}/${path}/${base} ...
  62.    if ! ${CPINC} ${file} ${INCPATH}/${path}/ ; then
  63.      exit
  64.    fi
  65.    chmod 644 ${INCPATH}/${path}/$base
  66.   done
  67.  done
  68. fi
  69.  
  70. if [ "${MANPATH}" != "" ]; then
  71.  ${MKDIRHIER} ${MANPATH}/man1
  72.  chmod 755 ${MANPATH} ${MANPATH}/man1
  73.  for i in man/*.1; do
  74.   #echo copy $i to ${MANPATH}/man1/`basename $i` ...
  75.   if cp $i ${MANPATH}/man1 ; then
  76.    chmod 644 ${MANPATH}/man1/`basename $i`
  77.   fi
  78.  done
  79. fi
  80.  
  81. if [ "${LIBPATH}" != "" ]; then
  82.  ${MKDIRHIER} ${LIBPATH}
  83.  chmod 755 ${LIBPATH}
  84.  if [ -f as.msg ]; then
  85.   for file in ${TARG_OBJDIR}*.msg; do
  86.    base=`basename ${file}`
  87.    #echo copy ${file} to ${LIBPATH}/${base} ...
  88.    if cp ${file} ${LIBPATH}/ ; then
  89.     chmod 644 ${LIBPATH}/${base}
  90.    fi
  91.   done
  92.  fi
  93. fi
  94.  
  95. if [ "${DOCPATH}" != "" ]; then
  96.  ${MKDIRHIER} ${DOCPATH}
  97.  chmod 755 ${DOCPATH}
  98.  for i in DE EN; do
  99.   for ext in doc html dvi ps pdf; do
  100.    if [ -f doc_$i/as.${ext} ]; then
  101.     #echo copy doc_$i/as.${ext} to ${DOCPATH}/as-$i.${ext} ...
  102.     cp doc_$i/as.${ext} ${DOCPATH}/as_$i.${ext}
  103.    fi
  104.   done
  105.   chmod 644 ${DOCPATH}/as_$i.*
  106.  done
  107.  cp doc_COM/taborg*.tex ${DOCPATH}
  108.  chmod 644 ${DOCPATH}/taborg*.tex
  109.  cp doc_COM/ps*.tex ${DOCPATH}
  110.  chmod 644 ${DOCPATH}/ps*.tex
  111.  cp doc_COM/biblio.tex ${DOCPATH}
  112.  chmod 644 ${DOCPATH}/biblio.tex
  113.  cp doc_COM/cp3finst.tex ${DOCPATH}
  114.  chmod 644 ${DOCPATH}/cp3finst.tex
  115.  cp COPYING ${DOCPATH}
  116.  chmod 644 ${DOCPATH}/COPYING
  117. fi
  118.