Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DojoInstaller
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External 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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dojo Project (HES-SO)
Projects
UI
DojoInstaller
Merge requests
!2
Resolve "DojoCLI must create $HOME/.local/bin if it does not exist"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Resolve "DojoCLI must create $HOME/.local/bin if it does not exist"
1-dojocli-must-create-home-local-bin-if-it-does-not-exist
into
main
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
orestis.malaspin
requested to merge
1-dojocli-must-create-home-local-bin-if-it-does-not-exist
into
main
5 months ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Closes
#1 (closed)
0
0
Merge request reports
Viewing commit
854b4e72
Show latest version
1 file
+
15
−
11
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Verified
854b4e72
added destination dir creation
· 854b4e72
orestis.malaspin
authored
5 months ago
installer.sh
+
15
−
11
View file @ 854b4e72
Edit in single-file editor
Open in Web IDE
Show full file
@@ -106,20 +106,24 @@ expand_tilde() {
}
parse_args
()
{
dest
=
'~/.local/bin'
[
"
$OS
"
=
"macos"
]
&&
dest
=
"/usr/local/bin"
dest
dir
=
'~/.local/bin'
[
"
$OS
"
=
"macos"
]
&&
dest
dir
=
"/usr/local/bin"
installer
=
''
while
:
;
do
case
"
$1
"
in
dest
=
*
)
dest
=
"
${
1
#*=
}
"
;;
installer
=
*
)
installer
=
"
${
1
#*=
}
"
;;
""
)
break
;;
*
)
die
"Unrecognized command line option:
$1
"
;;
esac
shift
case
"
$1
"
in
dest
dir
=
*
)
dest
dir
=
"
${
1
#*=
}
"
;;
installer
=
*
)
installer
=
"
${
1
#*=
}
"
;;
""
)
break
;;
*
)
die
"Unrecognized command line option:
$1
"
;;
esac
shift
done
dest
=
$(
expand_tilde
"
${
dest
}
"
)
dest
=
"
$dest
/dojo"
destdir
=
$(
expand_tilde
"
${
destdir
}
"
)
if
[
!
-d
"
$destdir
"
]
;
then
printf
"Directory %s does not exist. Creatring %s now.
\n
"
"
$destdir
"
"
$destdir
"
mkdir
-p
"
$destdir
"
fi
dest
=
"
$destdir
/dojo"
}
Loading