Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DBP CLI
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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
digital blueprint
DBP CLI
Commits
222c8217
Commit
222c8217
authored
1 year ago
by
Reiter, Christoph
Browse files
Options
Downloads
Patches
Plain Diff
shellcheck fixes
parent
396555d7
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#283550
passed
1 year ago
Stage: deploy
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/cli
+4
-8
4 additions, 8 deletions
bin/cli
with
4 additions
and
8 deletions
bin/cli
+
4
−
8
View file @
222c8217
...
@@ -6,17 +6,13 @@
...
@@ -6,17 +6,13 @@
set
-euo
pipefail
set
-euo
pipefail
export
SHELLOPTS
export
SHELLOPTS
BIN_PATH
=
"
`
dirname
\"
$0
\"
`
"
# relative
BIN_PATH
=
"
`
(
cd
\"
$BIN_PATH
\"
&&
pwd
)
`
"
# absolutized and normalized
install_app
()
{
install_app
()
{
# Set "/" as default path
# Set "/" as default path
path
=
${
3
:-
/
}
path
=
${
3
:-
/
}
destDir
=
${
2
:-
.
}
destDir
=
${
2
:-
.
}
echo
$destDir
echo
"
$destDir
"
# Remove trailing slash from path
# Remove trailing slash from path
path
=
${
path
%/
}
path
=
${
path
%/
}
...
@@ -26,8 +22,8 @@ install_app () {
...
@@ -26,8 +22,8 @@ install_app () {
echo
"Installing app: '
$packageName
' in directory '
$destDir
' with path prefix '
$path
'..."
;
echo
"Installing app: '
$packageName
' in directory '
$destDir
' with path prefix '
$path
'..."
;
# Do a basic check if a path was entered
# Do a basic check if a path was entered
if
[[
$destDir
!=
"."
&&
$destDir
!=
".."
]]
;
then
if
[[
"
$destDir
"
!=
"."
&&
"
$destDir
"
!=
".."
]]
;
then
mkdir
-p
$destDir
&&
cd
$_
||
exit
2
;
mkdir
-p
"
$destDir
"
&&
cd
"
$_
"
||
exit
2
;
fi
fi
npm init
-y
||
exit
2
;
npm init
-y
||
exit
2
;
...
@@ -60,7 +56,7 @@ case $1 in
...
@@ -60,7 +56,7 @@ case $1 in
install_app
"
${
@
:2
}
"
install_app
"
${
@
:2
}
"
;;
;;
"update-app"
)
"update-app"
)
update_app
$2
update_app
"
$2
"
;;
;;
*
)
*
)
echo
"Unknown command:
$1
"
;
echo
"Unknown command:
$1
"
;
...
...
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