Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
lemonldap-ng
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
258
Issues
258
List
Boards
Labels
Service Desk
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LemonLDAP NG
lemonldap-ng
Commits
403f08d3
Commit
403f08d3
authored
Oct 20, 2016
by
Yadd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade trunk from 1.9 (
#1096
)
parent
7431117e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
95 additions
and
4 deletions
+95
-4
Makefile
Makefile
+19
-2
scripts/doc.pl
scripts/doc.pl
+76
-2
No files found.
Makefile
View file @
403f08d3
...
...
@@ -703,8 +703,25 @@ install_examples_site:
install_doc_site
:
# Offline documentation install
@
rm
-rf
$(RDEFDOCDIR)
@
install
-v
-d
$(RDEFDOCDIR)
@
cp
-a
-f
doc/
*
$(RDEFDOCDIR)
# Install doc directories
@
install
-v
-d
-m
755
$(RDEFDOCDIR)
@
cd
doc
&&
find
*
-type
d |
(
cd
$(RDEFDOCDIR)
;
xargs
install
-v
-d
-m
755
)
&&
cd
-
# Install HTML files
@
cd
doc
&&
for
f
in
`
find
*
-type
f
-name
'*.html'
`
;
do
\
echo
"Installing
$$
f"
;
\
../scripts/transform-templates
\
usedebianlibs
$(USEDEBIANLIBS)
\
useexternallibs
$(USEEXTERNALLIBS)
\
jsminified
$(JSCOMPRESS)
\
cssminified
$(CSSCOMPRESS)
<
$$
f
\
>
$(RDEFDOCDIR)
/
$$
f
;
\
done
&&
cd
-
# Install other files
@
cd
doc
&&
for
f
in
`
find
*
-type
f
!
-name
'*.html'
`
;
do
\
install
-v
-m
644
$$
f
$(RDEFDOCDIR)
/
$$
f
;
\
done
&&
cd
-
# Install symlinks
@
cd
doc
&&
tar
cf -
`
find
*
-type
l
`
|
tar
xvf -
-C
$(RDEFDOCDIR)
&&
cd
-
install_conf_dir
:
install_sessions_dir install_notif_dir install_captcha_dir
# Configuration files install
...
...
scripts/doc.pl
View file @
403f08d3
...
...
@@ -45,8 +45,82 @@ system('find . -name \*.html -exec sed -i "/<link rel=\"alternate\"/d" {} \;');
system
('
find . -name \*.html -exec sed -i "/<link rel=\"canonical\"/d" {} \;
');
system
('
find . -name \*.html -exec sed -i "/oss\.maxcdn\.com/d" {} \;
');
# Add link to bootstrap
system
('
find . -name \*.html -exec sed -i "s#<link rel=\"stylesheet\" type=\"text/css\" href=\"lib/exe/css.php.t.bootstrap3.css\"/>#<link rel=\"stylesheet\" type=\"text/css\" href=\"lib/exe/css.php.t.bootstrap3.css\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"/static/bwr/bootstrap/dist/css/bootstrap.min.css\"/>#" {} \;
');
# Remove embedded jQuery
open
F
,
'
pages/documentation/current/lib/exe/js.php.t.bootstrap3.js
';
my
$buf
;
while
(
<
F
>
)
{
last
if
(
m#^/\*.*jQuery#
);
$buf
.=
$_
;
}
close
F
;
open
F
,
"
>pages/documentation/current/lib/exe/js.php.t.bootstrap3.js
";
print
F
$buf
;
close
F
;
# Unminify CSS (to avoid "src is missing" warning
open
F
,
'
pages/documentation/current/lib/exe/css.php.t.bootstrap3.css
';
$buf
=
join
'',
map
{
s/([;\}\{])/$1\n/g
;
$_
;
}
<
F
>
;
close
F
;
open
F
,
'
>pages/documentation/current/lib/exe/css.php.t.bootstrap3.css
';
print
F
$buf
;
close
F
;
# Replace links in HTML files
my
$cssbootstrap
=
'
<!-- //if:usedebianlibs
<link rel="stylesheet" type="text/css" href="/javascript/bootstrap/css/bootstrap.min.css" />
//elsif:useexternallibs
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"></script>
//elsif:cssminified
<link rel="stylesheet" type="text/css" href="/static/bwr/bootstrap/dist/css/bootstrap.min.css" />
//else -->
<link rel="stylesheet" type="text/css" href="/static/bwr/bootstrap/dist/css/bootstrap.css" />
<!-- //endif -->
';
my
$jquery
=
'
<!-- //if:usedebianlibs
<script type="text/javascript" src="/javascript/jquery/jquery.min.js"></script>
//elsif:useexternallibs
<script type="text/javascript" src="http://code.jquery.com/jquery-2.2.0.min.js"></script>
//elsif:jsminified
<script type="text/javascript" src="/static/bwr/jquery/dist/jquery.min.js"></script>
//else -->
<script type="text/javascript" src="/static/bwr/jquery/dist/jquery.js"></script>
<!-- //endif -->
';
my
$jqueryui
=
'
<!-- //if:usedebianlibs
<script type="text/javascript" src="/javascript/jquery-ui/jquery-ui.min.js"></script>
//elsif:useexternallibs
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script>
//elsif:jsminified
<script type="text/javascript" src="/lib/scripts/jquery-ui.min.js"></script>
//else -->
<script type="text/javascript" src="/lib/scripts/jquery-ui.js"></script>
<!-- //endif -->
';
open
CMD
,
"
find . -name '*.html'|
";
my
@list
=
map
{
chomp
;
$_
}
<
CMD
>
;
close
CMD
;
for
my
$file
(
@list
)
{
open
F
,
$file
;
my
$buf
=
join
'',
map
{
s#<link.*,href=".*bootstrap\.min\.css.*$"#$cssbootstrap#
;
s#src=".*bootstrap.min.js"#src="/javascript/bootstrap/js/bootstrap.min.js"#
;
s#(<link.*?lib/exe/css.php.t.bootstrap3.css"/>)#$1
$cssbootstrap#
;
s#(<script.*?bootstrap3.js"></script>)#$1
$jquery
$jqueryui#
;
$_
;
}
<
F
>
;
open
F
,
"
>
$file
";
print
F
$buf
;
close
F
;
}
# Restore jquery-ui
system
('
cp ../lemonldap-ng-portal/example/skins/common/js/jquery-ui-*.custom.js pages/documentation/current/lib/scripts/jquery-ui.js
');
system
('
cp ../lemonldap-ng-portal/example/skins/common/js/jquery-ui-*.custom.min.js pages/documentation/current/lib/scripts/jquery-ui.min.js
');
# Put content in a container
system
('
find . -name \*.html -exec sed -i "s#<div class=\"dokuwiki export\">#<div class=\"dokuwiki export container\">#" {} \;
');
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment