Commit 09352960 authored by Clément OUDOT's avatar Clément OUDOT

Update doc.pl to keep only the latest documentation (#442)

parent 587ef5b9
......@@ -510,14 +510,7 @@ manager_cpan: manager_conf
@mv ${SRCMANAGERDIR}/Lemonldap*.gz .
documentation:
@rm -f doc/pages/documentation/latest
@cd doc/ && ../scripts/doc.pl
@rm -rf doc/pages/documentation/{latest,1.0} doc/pages/wiki doc/pages/playground
@ln -s $$(perl -e '$$h{sprintf("%03d\.%03d\.%03d",split/\./,$$_)}=$$_ foreach(@ARGV); \
foreach(sort keys %h){$$last="$$h{$$_}\n"};print $$last;' \
$$(find doc/pages/documentation/ -maxdepth 1 -mindepth 1 -type d ! \
-name .svn ! -name latest -printf "%f\n") \
) doc/pages/documentation/latest
doxygen: clean
$(PERL) -i -pe 's/^(PROJECT_NUMBER\s*=\s*)\d.*$$/$${1}'$(VERSION)'/' Doxyfile
......
......@@ -16,6 +16,7 @@ use Tie::File;
my $offline_script_url =
'http://lemonldap-ng.org/lib/plugins/offline/create.php';
my $offline_zip_url = 'http://lemonldap-ng.org/lib/plugins/offline/offline.zip';
my $version = "1.2";
my $rc;
# Launch remote offline script
......@@ -34,6 +35,11 @@ system("rm -f offline.zip");
system("cp -rf offline/* .");
system("rm -rf offline");
# Keep only the latest
system("rm -rf pages/documentation/latest pages/wiki pages/playground");
system("mv pages/documentation/$version pages/documentation/latest");
system("rm -rf pages/documentation/1*");
# Correct some bad media links
system('find . -name \*.html -exec sed -i "s#/_media#../media#g" {} \;');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment