Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • First of all, an offering. Below is some bash-shell code that might be a start toward a portion of what you requested. The code was passed a parameter that was the name of a perl source tar-ball (.gz). It built the version of perl and installed it to a local usr/test/ directory tree relative to where it was installed, and at the time would execute the CPAN module's 'autobundle' command and write to a file. (It also removed the 'built-in' and 'command line' entries from the various Makefiles, because of issu

    • Argh! I didn't mean the formatting of the code to be so screwy. Anyway, an attempt to make the code look more readable (with appologies for having to resumbit):

      #!/bin/bash +x

      CSD=`pwd`
      PATH=$CSD/usr/test/bin:$PATH

      file=$1
      directory=`gzip -dc $file | tar tf - | head -1 | tr '/' ' ' | gawk '{print $1;}'`

      echo " $file - $directory "
      gzip -dc $file | tar xf -

      rm -fr $CSD/usr/test/*
      cd $directory

      rm -f config.sh Policy.sh
      sh Configure -des -Dprefix=$CSD/usr/test -Dusedevel -Uinstallusrbinperl
      for makefile in `find . -type f -name makefile`
      do
              cp -v $makefile $makefile.temp
              grep -v built-in $makefile.temp | grep -v 'command line' > $makefile
      done
      make
      make test
      make install
      ( cd /usr/include && $CSD/usr/test/bin/h2ph *.h sys/*.h )

      date >> ~/.cpan/Bundle/$directory.txt
      perl -MCPAN -e 'autobundle;'

      cd $CSD
      echo rm -fr $directory
      rm -fr $directory