Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
reference-repository
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
grid5000
reference-repository
Commits
9f1260e3
Commit
9f1260e3
authored
16 years ago
by
Cyril Rohr
Browse files
Options
Downloads
Patches
Plain Diff
Modified generator so that it doesn't write a hard link if it already exists
parent
04e3cf52
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
generators/lib/g5k_generator.rb
+4
-4
4 additions, 4 deletions
generators/lib/g5k_generator.rb
with
4 additions
and
4 deletions
generators/lib/g5k_generator.rb
+
4
−
4
View file @
9f1260e3
...
@@ -121,10 +121,10 @@ class ReferenceGenerator
...
@@ -121,10 +121,10 @@ class ReferenceGenerator
groups
.
has_key?
(
G5K
::
Link
)
and
groups
[
G5K
::
Link
].
each
do
|
link
|
groups
.
has_key?
(
G5K
::
Link
)
and
groups
[
G5K
::
Link
].
each
do
|
link
|
from
=
File
.
join
(
repository
,
"
#{
link
.
from
}
.json"
)
from
=
File
.
join
(
repository
,
"
#{
link
.
from
}
.json"
)
to
=
File
.
join
(
repository
,
link
.
path
)
to
=
File
.
join
(
repository
,
link
.
path
)
# Hard link
s
w
il
l always be regenerated
unles
s
F
il
e
.
exists?
(
to
)
# TODO: find a way to detect if a
link
has
to be
regenerated
puts
"Hard
link to be
written =
\t
#{
to
}
->
#{
from
}
"
puts
"Hard link to be written =
\t
#{
to
}
->
#{
from
}
"
FileUtils
.
link
(
from
,
to
,
:force
=>
true
)
unless
options
[
:simulate
]
FileUtils
.
link
(
from
,
to
,
:force
=>
true
)
unless
options
[
:simulate
]
end
end
end
end
end
...
...
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