Skip to content

Commit

Permalink
Move pickFiles "help" screen
Browse files Browse the repository at this point in the history
  • Loading branch information
totten committed Jul 21, 2022
1 parent d32f152 commit 78734e3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
15 changes: 0 additions & 15 deletions util/pickFiles.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,18 +102,3 @@ function pickSubset($files, $maxCount) {

return sortFilesByVer($selections);
}

function help($error = NULL) {
if ($error) {
fwrite(STDERR, $error);
}
echo "usage: pickFiles.php <fileExpr> ...\n";
echo "\n";
echo "<fileExpr> examples:\n";
echo " /var/foo.sql.gz A specific file\n";
echo " 4.5* All files in the default dir beginning with '4.2'\n";
echo " @4.5 All files in the default dir which are less than 4.5\n";
echo " @4.5.10 All files in the default dir which are less than 4.5.10\n";
echo " @4.2..5.1.0 All files starting at 4.2 and before 5.1.0\n";
echo "\n";
}
15 changes: 15 additions & 0 deletions util/pickFiles.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,21 @@

main($argv);

function help($error = NULL) {
if ($error) {
fwrite(STDERR, $error);
}
echo "usage: pickFiles.php <fileExpr> ...\n";
echo "\n";
echo "<fileExpr> examples:\n";
echo " /var/foo.sql.gz A specific file\n";
echo " 4.5* All files in the default dir beginning with '4.2'\n";
echo " @4.5 All files in the default dir which are less than 4.5\n";
echo " @4.5.10 All files in the default dir which are less than 4.5.10\n";
echo " @4.2..5.1.0 All files starting at 4.2 and before 5.1.0\n";
echo "\n";
}

function main($args) {
require_once __DIR__ . DIRECTORY_SEPARATOR . 'pickFiles.lib.php';
$prog = array_shift($args);
Expand Down

0 comments on commit 78734e3

Please sign in to comment.