Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
esm-architecture-analysis-replication-package
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
oceandsl
esm-architecture-analysis-replication-package
Commits
cee6856f
Commit
cee6856f
authored
1 year ago
by
Reiner Jung
Browse files
Options
Downloads
Patches
Plain Diff
Updated scripts.
parent
ee945f32
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
models/compare-models.sh
+1
-1
1 addition, 1 deletion
models/compare-models.sh
models/handle-model-archives.sh
+24
-6
24 additions, 6 deletions
models/handle-model-archives.sh
models/prepare-models-for-inspection.sh
+1
-1
1 addition, 1 deletion
models/prepare-models-for-inspection.sh
with
26 additions
and
8 deletions
models/compare-models.sh
+
1
−
1
View file @
cee6856f
...
@@ -27,7 +27,7 @@ checkExecutable "Restructuring" "${RESTRUCTURING}"
...
@@ -27,7 +27,7 @@ checkExecutable "Restructuring" "${RESTRUCTURING}"
checkDirectory
"Result directory"
"
${
OPTIMIZATION_DATA
}
"
checkDirectory
"Result directory"
"
${
OPTIMIZATION_DATA
}
"
# main
# main
for
JOB_DIRECTORY
in
`
find
"
${
OPTIMIZATION_DATA
}
"
-name
"
*
${
MODEL
}
*job"
`
;
do
for
JOB_DIRECTORY
in
`
find
"
${
OPTIMIZATION_DATA
}
"
-name
"
${
MODEL
}
*
.
job"
`
;
do
BASENAME
=
`
basename
"
${
JOB_DIRECTORY
}
"
`
BASENAME
=
`
basename
"
${
JOB_DIRECTORY
}
"
`
information
"----------------------------------------"
information
"----------------------------------------"
information
$BASENAME
information
$BASENAME
...
...
This diff is collapsed.
Click to expand it.
models/handle-model-archives.sh
+
24
−
6
View file @
cee6856f
...
@@ -22,7 +22,7 @@ checkDirectory "Result directory" "${OPTIMIZATION_DATA}"
...
@@ -22,7 +22,7 @@ checkDirectory "Result directory" "${OPTIMIZATION_DATA}"
if
[
"
$1
"
==
""
]
;
then
if
[
"
$1
"
==
""
]
;
then
error
"Missing action: extract, compress"
error
"Missing action: extract, compress"
information
"Usage: handle-model-archives.sh <extract|
compress
> [JOB_NAME_FRAGMENT]"
information
"Usage: handle-model-archives.sh <extract|
finalize|compress|restore
> [JOB_NAME_FRAGMENT]"
exit
1
exit
1
else
else
ACTION
=
"
$1
"
ACTION
=
"
$1
"
...
@@ -34,6 +34,8 @@ else
...
@@ -34,6 +34,8 @@ else
information
"compress"
information
"compress"
elif
[
"
${
ACTION
}
"
==
"restore"
]
;
then
elif
[
"
${
ACTION
}
"
==
"restore"
]
;
then
information
"restore"
information
"restore"
elif
[
"
${
ACTION
}
"
==
"cleanup"
]
;
then
information
"cleanup"
else
else
warn
"Unknown action
${
ACTION
}
"
warn
"Unknown action
${
ACTION
}
"
exit
1
exit
1
...
@@ -82,20 +84,34 @@ function restore() {
...
@@ -82,20 +84,34 @@ function restore() {
function
compress
()
{
function
compress
()
{
export
MERGED_MODEL_ARCHIVE
=
"
${
JOB_DIRECTORY
}
/merged-models.tar.xz"
export
MERGED_MODEL_ARCHIVE
=
"
${
JOB_DIRECTORY
}
/merged-models.tar.xz"
mkdir
-p
"
${
JOB_DIRECTORY
}
/merged-models"
export
MERGED_MODEL_DIR
=
"
${
JOB_DIRECTORY
}
/merged-models"
mv
"
${
JOB_DIRECTORY
}
/"
merge-optimized-
*
"
${
JOB_DIRECTORY
}
/merged-models"
if
[
-d
"
${
MERGED_MODEL_DIR
}
"
]
;
then
rm
-rf
"
${
MERGED_MODEL_DIR
}
"
fi
mkdir
-p
"
${
MERGED_MODEL_DIR
}
"
mv
"
${
JOB_DIRECTORY
}
/"
merge-optimized-
*
"
${
MERGED_MODEL_DIR
}
"
tar
-cJf
"
${
MERGED_MODEL_ARCHIVE
}
"
merged-models
tar
-cJf
"
${
MERGED_MODEL_ARCHIVE
}
"
merged-models
rm
-rf
"
${
JOB_DIRECTORY
}
/merged-models"
rm
-rf
"
${
MERGED_MODEL_DIR
}
"
# compress csv xmi yaml files
# compress csv xmi yaml files
export
MODIFICATIONS_ARCHIVE
=
"
${
JOB_DIRECTORY
}
/modifications.tar.xz"
export
MODIFICATIONS_ARCHIVE
=
"
${
JOB_DIRECTORY
}
/modifications.tar.xz"
mkdir
-p
"
${
JOB_DIRECTORY
}
/modifications"
export
MODIFICATIONS_DIR
=
"
${
JOB_DIRECTORY
}
/modifications"
if
[
-d
"
${
MODIFICATIONS_DIR
}
"
]
;
then
rm
-rf
"
${
MODIFICATIONS_DIR
}
"
fi
mkdir
-p
"
${
MODIFICATIONS_DIR
}
"
mv
"
${
JOB_DIRECTORY
}
/"
original-model-optimized-
*
.
*
modifications
mv
"
${
JOB_DIRECTORY
}
/"
original-model-optimized-
*
.
*
modifications
tar
-cJf
"
${
MODIFICATIONS_ARCHIVE
}
"
modifications
tar
-cJf
"
${
MODIFICATIONS_ARCHIVE
}
"
modifications
rm
-rf
"
${
JOB_DIRECTORY
}
/modifications
"
rm
-rf
"
${
MODIFICATIONS_DIR
}
"
}
}
function
finalize
()
{
function
finalize
()
{
compress
compress
cleanup
}
function
cleanup
()
{
rm
-rf
"
${
JOB_DIRECTORY
}
/original-model"
for
J
in
"
${
JOB_DIRECTORY
}
/optimized-"
*
;
do
for
J
in
"
${
JOB_DIRECTORY
}
/optimized-"
*
;
do
if
[
-d
"
$J
"
]
;
then
if
[
-d
"
$J
"
]
;
then
rm
-rf
"
$J
"
rm
-rf
"
$J
"
...
@@ -123,6 +139,8 @@ for JOB_DIRECTORY in `find "${OPTIMIZATION_DATA}" -name "*${MODEL}*job"` ; do
...
@@ -123,6 +139,8 @@ for JOB_DIRECTORY in `find "${OPTIMIZATION_DATA}" -name "*${MODEL}*job"` ; do
compress
compress
elif
[
"
${
ACTION
}
"
==
"restore"
]
;
then
elif
[
"
${
ACTION
}
"
==
"restore"
]
;
then
restore
restore
elif
[
"
${
ACTION
}
"
==
"cleanup"
]
;
then
cleanup
elif
[
"
${
ACTION
}
"
==
"finalize"
]
;
then
elif
[
"
${
ACTION
}
"
==
"finalize"
]
;
then
finalize
finalize
fi
fi
...
...
This diff is collapsed.
Click to expand it.
models/prepare-models-for-inspection.sh
+
1
−
1
View file @
cee6856f
...
@@ -30,7 +30,7 @@ touch "${MOP_LOG}"
...
@@ -30,7 +30,7 @@ touch "${MOP_LOG}"
# main
# main
COUNT
=
0
COUNT
=
0
for
JOB_DIRECTORY
in
`
find
"
${
OPTIMIZATION_DATA
}
"
-name
"
*
${
MODEL
}
*job"
`
;
do
for
JOB_DIRECTORY
in
`
find
"
${
OPTIMIZATION_DATA
}
"
-name
"
${
MODEL
}
*
.
job"
`
;
do
BASENAME
=
`
basename
"
${
JOB_DIRECTORY
}
"
`
BASENAME
=
`
basename
"
${
JOB_DIRECTORY
}
"
`
information
"----------------------------------------"
information
"----------------------------------------"
information
$BASENAME
information
$BASENAME
...
...
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