diff options
Diffstat (limited to 'makelist')
-rwxr-xr-x | makelist | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/makelist b/makelist new file mode 100755 index 0000000..de3393e --- /dev/null +++ b/makelist @@ -0,0 +1,28 @@ +#!/usr/bin/env php +<?php + +if ($_SERVER['argc'] < 2) { + die ("Usage ". $_SERVER['argv'][0] . " version\n"); +} +$ver = $_SERVER['argv'][1]; + +@mkdir($ver); + +$zip = new ZipArchive(); +foreach(glob("instantclient*-$ver.zip") as $archive) { + $zip->open($archive); + echo "+ $archive (" . $zip->numFiles . ")\n"; + $txt = array(); + for ($i = 0; $i < $zip->numFiles; $i++) { + $name = $zip->getNameIndex($i); + $pos = strpos($name, '/')+1; + $txt[] = substr($name, $pos); + } + sort($txt); + file_put_contents( + $ver . '/' . basename($archive, "-$ver.zip"), + implode("\n", $txt) + ); +} +echo "Done\n"; + |