Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Bash Headstart
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
cybersecurity
Bash Headstart
Commits
b213814e
Commit
b213814e
authored
4 years ago
by
Nikolaos Kakouros
Browse files
Options
Downloads
Patches
Plain Diff
wip
parent
64536e65
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
headstart-core.bash
+5
-7
5 additions, 7 deletions
headstart-core.bash
lib/core
+5
-0
5 additions, 0 deletions
lib/core
with
10 additions
and
7 deletions
headstart-core.bash
+
5
−
7
View file @
b213814e
#!/usr/bin/env bash
#!/usr/bin/env bash
# TODO add set -ueo pipefail until stack trace kicks in
# TODO add set -ueo pipefail until stack trace kicks in
# Path to the project's root directory
# The code below is not in a function as variables, functions, etc defined here
# and in the sourced files need to be accessible in the global scope.
# Path to the project's root directory
declare
-gx
PROJECT_DIR
declare
-gx
PROJECT_DIR
# Used for testing
# Used for testing
...
@@ -63,12 +66,7 @@ declare -x GO_TAB_COMPLETIONS_PATTERN=''
...
@@ -63,12 +66,7 @@ declare -x GO_TAB_COMPLETIONS_PATTERN=''
.
"
$_GO_USE_MODULES
"
'core'
.
"
$_GO_USE_MODULES
"
'core'
core_get_installed_version
core_get_installed_version
core_parse_project_config
if
!
[[
"
${
1
-
}
"
==
'core'
&&
"
${
2
-
}
"
==
'bootstrap'
]]
;
then
core_parse_project_config
# When bootstrapping, the project config does not need to be read, since it is
# create by bootstrap itself.
fi
function
headstart
()
{
function
headstart
()
{
local
debug
=
false
local
debug
=
false
...
...
This diff is collapsed.
Click to expand it.
lib/core
+
5
−
0
View file @
b213814e
...
@@ -61,6 +61,11 @@ function core_check_upgrades() {
...
@@ -61,6 +61,11 @@ function core_check_upgrades() {
}
}
function
core_parse_project_config
()
{
function
core_parse_project_config
()
{
if
[[
!
-r
"
$_HEADSTART_PROJECT_CONFIG
"
]]
;
then
# This will happen if we run 'core bootstrap' and this function gets called.
return
fi
local
conf
local
conf
local
value
local
value
...
...
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