http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11190 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #10 from Magnus Enger <magnus@enger.priv.no> --- (In reply to Frédéric Demians from comment #9)
If sitemap.pl is run without any arguments, it will create the sitemap files. I seem to remember we have a convention that scripts run without arguments should print a help message and exit, but it does not seem to be in the coding guidelines... Maybe add a --run parameter to actually run the script?
I'm not sure on this point. For me, a --run is required for scripts which alter database, and when there is a risk of data loose. This isn't the case here.
OK. This is really close now, but I have one last problem: It seems that if I run the script without the -dir parameter, no files are created in the current directory, and the script does not complain, with or without -v. But if I run the script with -dir and the absolute path to the current directory as an argument, the sitemap files ar created just fine. I am testing on a gitified package-install, so I have to use sudo to be able to read koha-conf.xml: $ sudo pwd /home/magnus/scripts/kohaclone # No files are creatd in /home/magnus/scripts/kohaclone: $ sudo KOHA_CONF=/etc/koha/sites/kohadev/koha-conf.xml perl misc/cronjobs/sitemap.pl -v Creation of Sitemap files in '.' directory Number of biblio records processed: 172 Number of Sitemap files: 1 # Files *are* created in /home/magnus/scripts/kohaclone: $ sudo KOHA_CONF=/etc/koha/sites/kohadev/koha-conf.xml perl misc/cronjobs/sitemap.pl -v -dir /home/magnus/scripts/kohaclone Creation of Sitemap files in '/home/magnus/scripts/kohaclone' directory Number of biblio records processed: 172 Number of Sitemap files: 1 -- You are receiving this mail because: You are watching all bug changes.