Skip to content

Instantly share code, notes, and snippets.

@metaperl
Created November 19, 2009 16:35
Show Gist options
  • Select an option

  • Save metaperl/238864 to your computer and use it in GitHub Desktop.

Select an option

Save metaperl/238864 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
$|++;
$VER="5.8.0";
# --- download src
$URL="http://www.swi-prolog.org/download/stable/src/pl-$VER.tar.gz";
$SRC="pl-$VER";
$TGZ="$SRC.tar.gz";
warn $URL;
`wget $URL` unless -e $TGZ;
# --- unpack src
unless (-e $SRC && -d $SRC) { `tar xvfz $TGZ`; }
# --- create proper src dir for cygwin
$REL=1;
$NEW="SWI-Prolog-$VER-$REL-src";
`mv $SRC $NEW`;
# --- tar and bzip source code
$TAR="$NEW.tar";
`tar cvf $TAR $NEW`;
`bzip2 $TAR`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment