Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
85752afe
Commit
85752afe
authored
Feb 16, 2007
by
Leigh B. Stoller
Browse files
When exporting a single run, be careful not to remove other runs.
parent
7d7c0999
Changes
1
Hide whitespace changes
Inline
Side-by-side
tbsetup/template_export.in
View file @
85752afe
...
...
@@ -156,10 +156,17 @@ my $checkout = "$projroot/$pid/export/$guid/$version/$exptidx";
# Cleanup existing goo.
if
(
-
e
$checkout
)
{
system
("
/bin/rm -rf
$checkout
");
my
$dirtoremove
=
$checkout
;
$dirtoremove
.=
"
/run
${runidx}
"
if
(
defined
(
$runidx
));
system
("
/bin/rm -rf
$dirtoremove
");
}
if
(
!
-
e
$checkout
)
{
system
("
mkdir -p
$checkout
")
==
0
or
fatal
(
-
1
,
"
Could not mkdir
$checkout
");
}
system
("
mkdir -p
$checkout
")
==
0
or
fatal
(
-
1
,
"
Could not mkdir
$checkout
");
#
# Since that worked, lets create the XML representation of it and stash
...
...
@@ -239,6 +246,9 @@ if ($debug) {
#
# Stash this into the checkout directory we created above.
#
unlink
("
$checkout
/export.xml
")
if
(
-
e
"
$checkout
/export.xml
");
open
(
DUMP
,
"
>
$checkout
/export.xml
")
or
fatal
(
-
1
,
"
Could not open
$checkout
/export.xml for writing
");
print
DUMP
"
$xml
\n
";
...
...
Write
Preview
Supports
Markdown
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