Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
opensilecs
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
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
silecs
opensilecs
Commits
d4b96bf0
Commit
d4b96bf0
authored
2 years ago
by
al.schwinn
Browse files
Options
Downloads
Patches
Plain Diff
resolve possiblerelative pathes (can crash the codegen)
parent
c80502d8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
silecs-cli/silecs.sh
+12
-0
12 additions, 0 deletions
silecs-cli/silecs.sh
with
12 additions
and
0 deletions
silecs-cli/silecs.sh
+
12
−
0
View file @
d4b96bf0
...
@@ -73,6 +73,9 @@ function silecs_validate {
...
@@ -73,6 +73,9 @@ function silecs_validate {
EXTENSION
=
$(
echo
"
$FILE
"
|
sed
's/^.*\.//'
)
EXTENSION
=
$(
echo
"
$FILE
"
|
sed
's/^.*\.//'
)
# Resolve possible relative path
FILE
=
$(
realpath
"
$FILE
"
)
case
$EXTENSION
in
case
$EXTENSION
in
silecsdesign
)
silecsdesign
)
SCHEMA
=
$SILECS_BASE
/silecs-model/
$SILECS_VERSION
/xml/DesignSchema.xsd
SCHEMA
=
$SILECS_BASE
/silecs-model/
$SILECS_VERSION
/xml/DesignSchema.xsd
...
@@ -151,6 +154,9 @@ function silecs_generate {
...
@@ -151,6 +154,9 @@ function silecs_generate {
exit
1
exit
1
fi
fi
# Resolve possible relative path
FILE
=
$(
realpath
"
$FILE
"
)
EXTENSION
=
$(
echo
"
$FILE
"
|
sed
's/^.*\.//'
)
EXTENSION
=
$(
echo
"
$FILE
"
|
sed
's/^.*\.//'
)
case
$EXTENSION
in
case
$EXTENSION
in
...
@@ -312,6 +318,9 @@ echo "created new silecsdeploy: $NEW_FILE"
...
@@ -312,6 +318,9 @@ echo "created new silecsdeploy: $NEW_FILE"
function
silecs_create
{
function
silecs_create
{
assert_n_arguments 2
assert_n_arguments 2
# Resolve possible relative path
FILE
=
$(
realpath
"
$FILE
"
)
EXTENSION
=
$(
echo
"
$FILE
"
|
sed
's/^.*\.//'
)
EXTENSION
=
$(
echo
"
$FILE
"
|
sed
's/^.*\.//'
)
FILE_PATH
=
$(
dirname
"
$FILE
"
)
FILE_PATH
=
$(
dirname
"
$FILE
"
)
...
@@ -336,6 +345,9 @@ function silecs_create {
...
@@ -336,6 +345,9 @@ function silecs_create {
function
silecs_open_diag
{
function
silecs_open_diag
{
assert_n_arguments 2
assert_n_arguments 2
# Resolve possible relative path
FILE
=
$(
realpath
"
$FILE
"
)
EXTENSION
=
$(
echo
"
$FILE
"
|
sed
's/^.*\.//'
)
EXTENSION
=
$(
echo
"
$FILE
"
|
sed
's/^.*\.//'
)
if
[
$EXTENSION
-ne
"silecsdeploy"
]
;
then
if
[
$EXTENSION
-ne
"silecsdeploy"
]
;
then
echo
"Error: diag tool only can be opened for a -silecsdeploy file"
echo
"Error: diag tool only can be opened for a -silecsdeploy file"
...
...
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