Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
KPI Plots-Calculations-CI
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
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
HIFIS
Overall
KPI
KPI Plots-Calculations-CI
Commits
183a6c59
Commit
183a6c59
authored
3 years ago
by
Marcus Hardt
Committed by
Uwe Jandt (DESY, HIFIS)
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix plots
parent
10d6f14e
No related branches found
Branches containing commit
No related tags found
1 merge request
!11
Fix plots
Pipeline
#106218
passed
3 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plot_general/plot.sh
+16
-4
16 additions, 4 deletions
plot_general/plot.sh
with
16 additions
and
4 deletions
plot_general/plot.sh
+
16
−
4
View file @
183a6c59
#!/bin/bash
if
[
!
-e
../plots/pdf
]
;
then
mkdir
-v
../plots/pdf
;
fi
if
[
!
-e
../plots/png
]
;
then
mkdir
-v
../plots/png
;
fi
if
[
!
-e
../plots/svg
]
;
then
mkdir
-v
../plots/svg
;
fi
if
[
!
-d
../plots/pdf
]
;
then
mkdir
-pv
../plots/pdf
;
fi
if
[
!
-d
../plots/png
]
;
then
mkdir
-pv
../plots/png
;
fi
if
[
!
-d
../plots/svg
]
;
then
mkdir
-pv
../plots/svg
;
fi
# create plot(s) for every data.csv found within data folder
for
datafile
in
../data/
*
/data.csv
;
do
{
echo
-e
"
\n
-------------------
${
datafile
}
"
test
-f
${
datafile
}
||
{
echo
"File
${
datafile
}
does not exist, skipping"
continue
}
# cut on last "/" to get folder name
folder
=
$(
echo
$datafile
| rev |
cut
-d
"/"
-f
2- | rev
)
folder
=
`
dirname
${
datafile
}
`
basefile
=
`
basename
${
datafile
}
`
# Clean up any remaining *_plot.csv if there are any. They must be created on the fly.
if
[
-e
"
${
datafile
%.csv
}
_plot.csv"
]
;
then
...
...
@@ -22,9 +30,10 @@ for datafile in ../data/*/data.csv; do
pushd
"
$folder
"
./filter.sh
popd
echo
"Filter done"
else
# Link from same directory, so use bare file name without path
ln
-sv
"
$
(
echo
$datafile
| rev |
cut
-d
"/"
-f
1 | rev
)
"
"
${
datafile
%.csv
}
_plot.csv"
ln
-sv
"
$
{
basefile
}
"
"
${
datafile
%.csv
}
_plot.csv"
fi
# Plotting.
...
...
@@ -33,6 +42,9 @@ for datafile in ../data/*/data.csv; do
# - there is a specific plot.plt already deposited for the specific folder.
if
[
!
-e
"
$folder
"
/plot.plt
]
;
then
# remove the non-existing file, just to eliminate broken symlinks
rm
-f
"
$folder
"
/plot.plt
echo ln
-sv
"
$(
pwd
)
"
/plot.plt
"
$folder
"
/
;
ln
-sv
"
$(
pwd
)
"
/plot.plt
"
$folder
"
/
;
fi
...
...
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