Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
e3-require
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
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
Code review analytics
Issue 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
Anders Lindh Olsson
e3-require
Commits
1c10e982
Commit
1c10e982
authored
4 years ago
by
Simon Rose
Browse files
Options
Downloads
Patches
Plain Diff
Added flag to iocsh.bash to choose env.sh file
parent
1d4f489b
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
tools/iocsh.bash
+2
-6
2 additions, 6 deletions
tools/iocsh.bash
tools/iocsh_functions
+22
-0
22 additions, 0 deletions
tools/iocsh_functions
with
24 additions
and
6 deletions
tools/iocsh.bash
+
2
−
6
View file @
1c10e982
...
...
@@ -58,12 +58,8 @@ declare -r TMP_PATH="/tmp/systemd-private-e3-iocsh-$(whoami)"
# To get the absolute path where iocsh.bash is executed
IOCSH_TOP
=
${
PWD
}
# Load any environment variables
if
[
-f
"
$IOCSH_TOP
/env.sh"
]
;
then
echo
"Loading environment variables from
$IOCSH_TOP
/env.sh"
source
"
$IOCSH_TOP
/env.sh"
fi
# Load any environment variables, default is $IOCSH_TOP/env.sh
loadEnv
"
$@
"
BASECODE
=
"
$(
basecode_generator
)
"
...
...
This diff is collapsed.
Click to expand it.
tools/iocsh_functions
+
22
−
0
View file @
1c10e982
...
...
@@ -374,7 +374,26 @@ function check_mandatory_env_settings
done
}
;
function
loadEnv
{
local
envfile
=
$IOCSH_TOP
/env.sh
while
[
$#
-gt
0
]
;
do
arg
=
$1
case
$arg
in
(
-e
)
shift
envfile
=
$1
;;
esac
shift
done
if
[
-f
"
$envfile
"
]
;
then
echo
"Loading environment variables from
$envfile
"
source
"
$envfile
"
fi
}
function
loadFiles
{
...
...
@@ -438,6 +457,9 @@ function loadFiles
(
-dv
)
shift
__LOADER__
=
"valgrind --leak-check=full "
;;
(
-e
)
shift
;;
(
-
*
)
printf
"Unknown option
$1
\n\n
"
>
&2
...
...
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