Rename flag to --ebook-www-filesystem-path

This commit is contained in:
Mike Colagrosso 2024-10-22 16:41:52 -06:00 committed by Alex Cabal
parent 627f90c0e2
commit 7253ad41ca
2 changed files with 5 additions and 5 deletions

View file

@ -391,7 +391,7 @@ do
printf "Updating/inserting ebook in database ... " printf "Updating/inserting ebook in database ... "
fi fi
"${scriptsDir}"/update-ebook-database --ebookWwwFilesystemPath "${webDir}" "${scriptsDir}"/update-ebook-database --ebook-www-filesystem-path "${webDir}"
if [ "${verbose}" = "true" ]; then if [ "${verbose}" = "true" ]; then
printf "Done.\n" printf "Done.\n"

View file

@ -4,10 +4,10 @@ require_once('/standardebooks.org/web/lib/Core.php');
use function Safe\getopt; use function Safe\getopt;
$longopts = ['ebookWwwFilesystemPath:', 'verbose']; $longopts = ['ebook-www-filesystem-path:', 'verbose'];
$options = getopt('v', $longopts); $options = getopt('v', $longopts);
$ebookWwwFilesystemPath = $options['ebookWwwFilesystemPath'] ?? null; $ebookWwwFilesystemPath = $options['ebook-www-filesystem-path'] ?? null;
$verbose = false; $verbose = false;
if(isset($options['v']) || isset($options['verbose'])){ if(isset($options['v']) || isset($options['verbose'])){
@ -15,12 +15,12 @@ if(isset($options['v']) || isset($options['verbose'])){
} }
if($ebookWwwFilesystemPath === null){ if($ebookWwwFilesystemPath === null){
print("Expected usage: update-ebook-database [-v,--verbose] --ebookWwwFilesystemPath <path>\n"); print("Expected usage: update-ebook-database [-v,--verbose] --ebook-www-filesystem-path <path>\n");
exit(1); exit(1);
} }
if($verbose){ if($verbose){
print("ebookWwwFilesystemPath: $ebookWwwFilesystemPath\n"); print("ebook-www-filesystem-path: $ebookWwwFilesystemPath\n");
} }
try{ try{