Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
autoicon
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
Container 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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
w2w
autoicon
Commits
e569b408
Commit
e569b408
authored
2 years ago
by
Oriol Tintó
Browse files
Options
Downloads
Patches
Plain Diff
Fix clean template.
parent
7abd1c67
No related branches found
Branches containing commit
No related tags found
1 merge request
!3
Refactor folder structure. Putting configuration files and namelists inside...
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
templates/common/clean.sh
+7
-8
7 additions, 8 deletions
templates/common/clean.sh
with
7 additions
and
8 deletions
templates/common/clean.sh
+
7
−
8
View file @
e569b408
...
@@ -5,19 +5,18 @@ WORKDIR=%HPCROOTDIR%
...
@@ -5,19 +5,18 @@ WORKDIR=%HPCROOTDIR%
STARTDATE
=
%SDATE%
STARTDATE
=
%SDATE%
MEMBER
=
%MEMBER%
MEMBER
=
%MEMBER%
FILES_TO_CLEAN
=
'%simulation.FILES_TO_CLEAN%'
FILES_TO_CLEAN
=
'%simulation.FILES_TO_CLEAN%'
echo
"
${
FILES_TO_CLEAN
}
"
echo
"
${
FILES_TO_CLEAN
}
"
# Define run directory
# Define run directory
RUNDIR
=
${
WORKDIR
}
/
${
STARTDATE
}
/
${
MEMBER
}
RUNDIR
=
${
WORKDIR
}
/
${
STARTDATE
}
/
${
MEMBER
}
# Copy the output files
cd
${
RUNDIR
}
||
exit
for
file_name
in
"
${
FILES_TO_CLEAN
}
"
;
do
# Remove the files in the run directory
echo
"Removing:"
${
file_name
}
rm
${
FILES_TO_CLEAN
}
rm
"
${
RUNDIR
}
/
${
file_name
}
"
done
# Remove the
output
files
from
the remote
machine
# Remove the files
in
the remote
output directory
OUTPUT_DIR
=
${
WORKDIR
}
/output/
${
STARTDATE
}
/
${
MEMBER
}
OUTPUT_DIR
=
${
WORKDIR
}
/output/
${
STARTDATE
}
/
${
MEMBER
}
rm
${
OUTPUT_DIR
}
/
*
cd
${
OUTPUT_DIR
}
||
exit
rm
${
FILES_TO_CLEAN
}
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