Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eic_container
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
Container registry
Model registry
Operate
Environments
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
containers
eic_container
Commits
e37718e0
Commit
e37718e0
authored
3 years ago
by
Wouter Deconinck
Committed by
Sylvester Joosten
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
eic-env.sh: make POSIX compliant
parent
9bc3ba12
No related branches found
No related tags found
1 merge request
!186
eic-env.sh: make POSIX compliant
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
containers/jug/eic-env.sh
+13
-16
13 additions, 16 deletions
containers/jug/eic-env.sh
with
13 additions
and
16 deletions
containers/jug/eic-env.sh
+
13
−
16
View file @
e37718e0
#!/bin/
ba
sh
#!/bin/sh
for
i
in
/etc/profile.d/
*
.sh
;
do
if
[
-r
$i
]
;
then
.
$i
if
[
-r
"
$i
"
]
;
then
.
"
$i
"
fi
done
...
...
@@ -18,16 +18,13 @@ if [ -f /etc/jug_info ]; then
container
=
$(
grep
-e
'jug_'
/etc/jug_info |
tail
-n
1 |
awk
'{print($2);}'
)
container
=
${
container
%
:
}
## jug_xl
version
=
$(
grep
-e
'jug_'
/etc/jug_info |
tail
-n
1 |
awk
'{print($3);}'
)
if
[
!
-z
${
container
}
]
;
then
if
[[
$version
=
~
'unstable'
]]
;
then
sigil
=
"?"
elif
[[
$version
=
~
'nightly'
]]
;
then
sigil
=
""
elif
[[
$version
=
~
'testing'
]]
;
then
sigil
=
"*"
else
# stable
sigil
=
"+"
fi
if
[
-n
"
${
container
}
"
]
;
then
case
"
${
version
}
"
in
*
unstable
*
)
sigil
=
"?"
;;
*
nightly
*
)
sigil
=
""
;;
*
testing
*
)
sigil
=
"*"
;;
*
)
sigil
=
"+"
;;
esac
PS1_PREAMBLE
=
"
${
container
}${
sigil
}
> "
unset
sigil
fi
...
...
@@ -42,13 +39,13 @@ unset PS1_PREAMBLE
## can import into our plain bash --norc --noprofile session
## (aliases cannot be transferred to a child shell)
ls
()
{
/bin/ls
--color
=
auto
$@
/bin/ls
--color
=
auto
"
$@
"
}
less
()
{
/usr/bin/less
-R
$@
/usr/bin/less
-R
"
$@
"
}
grep
()
{
/bin/grep
--color
=
auto
$@
/bin/grep
--color
=
auto
"
$@
"
}
MYSHELL
=
$(
ps
-p
$$
|
awk
'{print($4);}'
|
tail
-n1
)
## only export the functions for bash, as this does not work
...
...
This diff is collapsed.
Click to expand it.
Wouter Deconinck
@wdconinc
mentioned in commit
eef1fa07
·
3 years ago
mentioned in commit
eef1fa07
mentioned in commit eef1fa070fc42810c05d690285e2e76ddba2f225
Toggle commit list
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