Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Firmware
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
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alberto Ruiz Garcia
Firmware
Commits
1ecbb733
Commit
1ecbb733
authored
9 years ago
by
Lorenz Meier
Browse files
Options
Downloads
Plain Diff
Merge branch 'beta'
parents
3873fe1c
9efc37a3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Tools/px_generate_uorb_topic_headers.py
+12
-12
12 additions, 12 deletions
Tools/px_generate_uorb_topic_headers.py
with
12 additions
and
12 deletions
Tools/px_generate_uorb_topic_headers.py
+
12
−
12
View file @
1ecbb733
...
...
@@ -155,14 +155,16 @@ def copy_changed(inputdir, outputdir, prefix=''):
shutil
.
copy
(
fni
,
fno
)
print
(
"
{0}: new header file
"
.
format
(
f
))
continue
# The file exists in inputdir and outputdir
# only copy if contents do not match
if
not
filecmp
.
cmp
(
fni
,
fno
):
shutil
.
copy
(
fni
,
fno
)
print
(
"
{0}: updated
"
.
format
(
f
))
continue
print
(
"
{0}: unchanged
"
.
format
(
f
))
if
os
.
path
.
getmtime
(
fni
)
>
os
.
path
.
getmtime
(
fno
):
# The file exists in inputdir and outputdir
# only copy if contents do not match
if
not
filecmp
.
cmp
(
fni
,
fno
):
shutil
.
copy
(
fni
,
fno
)
print
(
"
{0}: updated
"
.
format
(
f
))
continue
#print("{0}: unchanged".format(f))
def
convert_dir_save
(
inputdir
,
outputdir
,
templatedir
,
temporarydir
,
prefix
):
...
...
@@ -171,11 +173,9 @@ def convert_dir_save(inputdir, outputdir, templatedir, temporarydir, prefix):
Unchanged existing files are not overwritten.
"""
# Create new headers in temporary output directory
if
(
convert_dir
(
inputdir
,
temporarydir
,
templatedir
)):
# Copy changed headers from temporary dir to output dir
copy_changed
(
temporarydir
,
outputdir
,
prefix
)
else
:
print
(
'
No changes.
'
)
convert_dir
(
inputdir
,
temporarydir
,
templatedir
)
# Copy changed headers from temporary dir to output dir
copy_changed
(
temporarydir
,
outputdir
,
prefix
)
if
__name__
==
"
__main__
"
:
parser
=
argparse
.
ArgumentParser
(
...
...
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