Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bjcp-2015-styleguide
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Frank Steinberg
bjcp-2015-styleguide
Commits
b421efe2
Commit
b421efe2
authored
5 years ago
by
Frank Steinberg
Browse files
Options
Downloads
Patches
Plain Diff
Some cleanup.
parent
2c114814
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Makefile
+13
-20
13 additions, 20 deletions
Makefile
with
13 additions
and
20 deletions
Makefile
+
13
−
20
View file @
b421efe2
...
@@ -10,10 +10,6 @@ GLOSSARYID = bjcp-en-de-glossary
...
@@ -10,10 +10,6 @@ GLOSSARYID = bjcp-en-de-glossary
default
:
bjcp-2015-styleguide-orig.xml bjcp-2015-styleguide-de.xml bjcp-2015-styleguide-orig.html bjcp-2015-styleguide-de.html web/bjcp-2015-styleguide-orig.xml web/bjcp-2015-styleguide-de.xml web/bjcp-2015-styleguide-orig.html web/bjcp-2015-styleguide-de.html web/bjcp-2015-styleguide-de-auto.xml
default
:
bjcp-2015-styleguide-orig.xml bjcp-2015-styleguide-de.xml bjcp-2015-styleguide-orig.html bjcp-2015-styleguide-de.html web/bjcp-2015-styleguide-orig.xml web/bjcp-2015-styleguide-de.xml web/bjcp-2015-styleguide-orig.html web/bjcp-2015-styleguide-de.html web/bjcp-2015-styleguide-de-auto.xml
cache/2015_Guidelines_Beer.docx
:
cache/2015_Guidelines_Beer.docx
:
@
if
[
!
-d
cache
]
;
then
mkdir
cache
;
fi
@
if
[
!
-d
cache
]
;
then
mkdir
cache
;
fi
@
curl
-s
https://www.bjcp.org/docs/2015_Guidelines_Beer.docx
-o
cache/2015_Guidelines_Beer.docx
@
curl
-s
https://www.bjcp.org/docs/2015_Guidelines_Beer.docx
-o
cache/2015_Guidelines_Beer.docx
...
@@ -57,33 +53,17 @@ web/bjcp-2015-styleguide-orig.html: bjcp-2015-styleguide-orig.html
...
@@ -57,33 +53,17 @@ web/bjcp-2015-styleguide-orig.html: bjcp-2015-styleguide-orig.html
web/bjcp-2015-styleguide-de.html
:
bjcp-2015-styleguide-de.html
web/bjcp-2015-styleguide-de.html
:
bjcp-2015-styleguide-de.html
cp
bjcp-2015-styleguide-de.html web/
cp
bjcp-2015-styleguide-de.html web/
web/edit-old.html
:
xsl/bjcp-2015-styleguide-html.xsl bjcp-2015-styleguide-de.xml
@
echo
"Document update in progress. Please wait a moment and reload..."
>
web/edit-old.html
@
xsltproc
--stringparam
edit
yes
--stringparam
orig bjcp-2015-styleguide-orig.xml xsl/bjcp-2015-styleguide-html.xsl bjcp-2015-styleguide-de.xml
>
web/edit.html.tmp
@
mv
web/edit.html.tmp web/edit-old.html
@
echo
"built
$@
"
format
:
format
:
@
for
f
in
de/
*
.xml
;
do
xmllint
--format
$$
f |
sed
-e
's/ standalone="yes"//'
>
cache/tmp.xml
;
cmp
-s
cache/tmp.xml
$$
f
;
if
[
$$
?
-ne
0
]
;
then
cat
cache/tmp.xml
>
$$
f
;
echo
"reformatted
$$
f"
;
fi
;
rm
cache/tmp.xml
;
done
@
for
f
in
de/
*
.xml
;
do
xmllint
--format
$$
f |
sed
-e
's/ standalone="yes"//'
>
cache/tmp.xml
;
cmp
-s
cache/tmp.xml
$$
f
;
if
[
$$
?
-ne
0
]
;
then
cat
cache/tmp.xml
>
$$
f
;
echo
"reformatted
$$
f"
;
fi
;
rm
cache/tmp.xml
;
done
status
:
bjcp-2015-styleguide-orig.xml
status
:
bjcp-2015-styleguide-orig.xml
@
-xsltproc
--stringparam
lang de xsl/bjcp-2015-styleguide-status.xsl bjcp-2015-styleguide-orig.xml 2>&1 |
grep
-v
"failed to load external entity"
@
-xsltproc
--stringparam
lang de xsl/bjcp-2015-styleguide-status.xsl bjcp-2015-styleguide-orig.xml 2>&1 |
grep
-v
"failed to load external entity"
check
:
bjcp-2015-styleguide-orig.xml bjcp-2015-styleguide-de.xml
check
:
bjcp-2015-styleguide-orig.xml bjcp-2015-styleguide-de.xml
@
for
f
in
de/
*
.xml
;
do
xmllint
--noout
--schema
xsd/bjcp-styleguide-2015.xsd
$$
f
;
done
@
for
f
in
de/
*
.xml
;
do
xmllint
--noout
--schema
xsd/bjcp-styleguide-2015.xsd
$$
f
;
done
@
xmllint
--noout
--schema
xsd/bjcp-styleguide-2015.xsd bjcp-2015-styleguide-orig.xml
@
xmllint
--noout
--schema
xsd/bjcp-styleguide-2015.xsd bjcp-2015-styleguide-orig.xml
@
xmllint
--noout
--schema
xsd/bjcp-styleguide-2015.xsd bjcp-2015-styleguide-de.xml
@
xmllint
--noout
--schema
xsd/bjcp-styleguide-2015.xsd bjcp-2015-styleguide-de.xml
background
:
@
nohup
sh
-c
'if [ ! -e .background ] ; then touch .background ; rm -f .background-again bjcp-2015-styleguide-de.xml web/bjcp-2015-styleguide-de.xml ; make ; rm .background ; if [ -e .background-again ] ; then rm bjcp-2015-styleguide-de.xml web/bjcp-2015-styleguide-de.xml ; make background ; fi ; else touch .background-again ; fi'
>
/dev/null 2>&1 &
install
:
ssh z
"cd /var/www ; if [ -d bjcp-2015-styleguide ] ; then cd bjcp-2015-styleguide ; sudo -u www-data git pull ; sudo -u www-data make ; else sudo -u www-data git clone https://github.com/frsteinb/bjcp-2015-styleguide.git ; cd bjcp-2015-styleguide ; sudo -u www-data mkdir web/snippets ; sudo -u www-data make ; fi"
apply
:
if
[
-d
web/snippets
]
;
then for
f
in
web/snippets/
*
.xml
;
do
xsltproc xsl/bjcp-2015-styleguide-apply.xsl
$$
f
;
echo
"applied
$$
f"
;
done
;
fi
clean
:
clean
:
@
rm
-rf
orig
@
rm
-rf
orig
@
rm
-f
bjcp-2015-styleguide-orig.xml
@
rm
-f
bjcp-2015-styleguide-orig.xml
...
@@ -97,6 +77,19 @@ distclean: clean
...
@@ -97,6 +77,19 @@ distclean: clean
@
rm
-rf
cache
@
rm
-rf
cache
@
echo
"complete cleanup done"
@
echo
"complete cleanup done"
## Web Editor stuff -- this works only with additional manual adjustments
background
:
@
nohup
sh
-c
'if [ ! -e .background ] ; then touch .background ; rm -f .background-again bjcp-2015-styleguide-de.xml web/bjcp-2015-styleguide-de.xml ; make ; rm .background ; if [ -e .background-again ] ; then rm bjcp-2015-styleguide-de.xml web/bjcp-2015-styleguide-de.xml ; make background ; fi ; else touch .background-again ; fi'
>
/dev/null 2>&1 &
install
:
ssh z
"cd /var/www ; if [ -d bjcp-2015-styleguide ] ; then cd bjcp-2015-styleguide ; sudo -u www-data git pull ; sudo -u www-data make ; else sudo -u www-data git clone https://github.com/frsteinb/bjcp-2015-styleguide.git ; cd bjcp-2015-styleguide ; sudo -u www-data mkdir web/snippets ; sudo -u www-data make ; fi"
apply
:
if
[
-d
web/snippets
]
;
then for
f
in
web/snippets/
*
.xml
;
do
xsltproc xsl/bjcp-2015-styleguide-apply.xsl
$$
f
;
echo
"applied
$$
f"
;
done
;
fi
## Google Translate stuff -- this works only for users with a properly configured Google Cloud setup
delete-glossary
:
delete-glossary
:
curl
-X
DELETE
-H
"Authorization: Bearer "
`
gcloud auth application-default print-access-token
`
https://translation.googleapis.com/v3beta1/projects/
$(
PROJECTID
)
/locations/
$(
LOCATION
)
/glossaries/
$(
GLOSSARYID
)
curl
-X
DELETE
-H
"Authorization: Bearer "
`
gcloud auth application-default print-access-token
`
https://translation.googleapis.com/v3beta1/projects/
$(
PROJECTID
)
/locations/
$(
LOCATION
)
/glossaries/
$(
GLOSSARYID
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment