home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Internet / WWW / Perl_WWW_Utilities / perlMIF_beta2 / install_mif < prev    next >
Encoding:
Text File  |  1994-06-07  |  1.5 KB  |  75 lines

  1. #! /bin/csh -f
  2. #
  3. # Install script for Perl library 'mif' and associated programs.
  4. #
  5. # Look for lines with the string 'CONFIG' for customizing the installation
  6. # script for your site.
  7. #
  8.  
  9. # Set file mask
  10. umask 022
  11.  
  12. # Array of files to install in bin directory
  13. set binfiles = ( \
  14.     xrgb2mif \
  15.     edc2html \
  16. )
  17. # Array of files to install in perl lib directory
  18. set libfiles = ( \
  19.     mif.pl \
  20.     mif_char.pl \
  21.     mif_colc.pl \
  22.     mif_conc.pl \
  23.     mif_dict.pl \
  24.     mif_doc.pl \
  25.     mif_edc.pl \
  26.     mif_elem.pl \
  27.     mif_fntc.pl \
  28.     mif_font.pl \
  29.     mif_id.pl \
  30.     mif_pgf.pl \
  31.     mif_pgfc.pl \
  32.     mif_rulc.pl \
  33.     mif_tab.pl \
  34.     mif_units.pl \
  35.     mif_varf.pl \
  36.     mif_views.pl \
  37.     mif_xrefs.pl \
  38. )
  39.  
  40. # CONFIG: $bindir is location of executable programs
  41. set bindir = '/usr/local/bin'
  42.  
  43. # CONFIG: $libdir is location of Perl library files
  44. set libdir = '/usr/local/lib/perl'
  45.  
  46. # Check if directories exist
  47. if (! -d $bindir) then
  48.     echo "$bindir not a directory or non-existent"
  49.     exit 1
  50. endif
  51. if (! -d $libdir) then
  52.     echo "$libdir not a directory or non-existent"
  53.     exit 1
  54. else
  55.     if (! -e $libdir/mif) then
  56.     mkdir $libdir/mif
  57.     /bin/chmod 755 $libdir/mif
  58.     else if (! -d $libdir/mif) then
  59.     echo "$libdir/mif not a directory"
  60.     exit 1
  61.     endif
  62. endif
  63.  
  64. foreach x ($binfiles)
  65.     echo "Installing $x into $bindir"
  66.     /bin/cp $x $bindir
  67.     /bin/chmod 755 $bindir/$x
  68. end
  69. cd mif
  70. foreach x ($libfiles)
  71.     echo "Installing $x into $libdir/mif"
  72.     /bin/cp $x $libdir/mif
  73.     /bin/chmod 644 $libdir/mif/$x
  74. end
  75.