--- toast 2009/03/20 06:05:00 1.464 +++ toast 2009/03/29 22:48:35 1.465 @@ -1709,6 +1709,7 @@ || /\x00ustar[ \x00]/; return ".shar" if m:^(\#!/bin/sh\n)?\# This is a shell archive:; return ".patch" if /^(diff |\*\*\* |Only in |Common subdirectories: |--- )/m; + return "script" if m:^#!/\w+/\w:; return ""; } @@ -2064,6 +2065,12 @@ { silentcd($outdir); safeexec("unzip", "-qo", $infile) if $type eq ".zip"; + if($type eq "script") + { + md("bin"); + writescript(path("bin", basename($infile)), readfile($infile)); + exit(0); + } safeopen(*STDIN, "<", $infile); extractstdin($type); error;