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
eef1fa07
Commit
eef1fa07
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
(cherry picked from commit
e37718e0
)
parent
24c986a4
No related branches found
No related tags found
1 merge request
!201
Add awkward-array package
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 @
eef1fa07
#!/bin/
ba
sh
#!/bin/sh
for
i
in
/etc/profile.d/
*
.sh
;
do
for
i
in
/etc/profile.d/
*
.sh
;
do
if
[
-r
$i
]
;
then
if
[
-r
"
$i
"
]
;
then
.
$i
.
"
$i
"
fi
fi
done
done
...
@@ -18,16 +18,13 @@ if [ -f /etc/jug_info ]; then
...
@@ -18,16 +18,13 @@ if [ -f /etc/jug_info ]; then
container
=
$(
grep
-e
'jug_'
/etc/jug_info |
tail
-n
1 |
awk
'{print($2);}'
)
container
=
$(
grep
-e
'jug_'
/etc/jug_info |
tail
-n
1 |
awk
'{print($2);}'
)
container
=
${
container
%
:
}
## jug_xl
container
=
${
container
%
:
}
## jug_xl
version
=
$(
grep
-e
'jug_'
/etc/jug_info |
tail
-n
1 |
awk
'{print($3);}'
)
version
=
$(
grep
-e
'jug_'
/etc/jug_info |
tail
-n
1 |
awk
'{print($3);}'
)
if
[
!
-z
${
container
}
]
;
then
if
[
-n
"
${
container
}
"
]
;
then
if
[[
$version
=
~
'unstable'
]]
;
then
case
"
${
version
}
"
in
sigil
=
"?"
*
unstable
*
)
sigil
=
"?"
;;
elif
[[
$version
=
~
'nightly'
]]
;
then
*
nightly
*
)
sigil
=
""
;;
sigil
=
""
*
testing
*
)
sigil
=
"*"
;;
elif
[[
$version
=
~
'testing'
]]
;
then
*
)
sigil
=
"+"
;;
sigil
=
"*"
esac
else
# stable
sigil
=
"+"
fi
PS1_PREAMBLE
=
"
${
container
}${
sigil
}
> "
PS1_PREAMBLE
=
"
${
container
}${
sigil
}
> "
unset
sigil
unset
sigil
fi
fi
...
@@ -42,13 +39,13 @@ unset PS1_PREAMBLE
...
@@ -42,13 +39,13 @@ unset PS1_PREAMBLE
## can import into our plain bash --norc --noprofile session
## can import into our plain bash --norc --noprofile session
## (aliases cannot be transferred to a child shell)
## (aliases cannot be transferred to a child shell)
ls
()
{
ls
()
{
/bin/ls
--color
=
auto
$@
/bin/ls
--color
=
auto
"
$@
"
}
}
less
()
{
less
()
{
/usr/bin/less
-R
$@
/usr/bin/less
-R
"
$@
"
}
}
grep
()
{
grep
()
{
/bin/grep
--color
=
auto
$@
/bin/grep
--color
=
auto
"
$@
"
}
}
MYSHELL
=
$(
ps
-p
$$
|
awk
'{print($4);}'
|
tail
-n1
)
MYSHELL
=
$(
ps
-p
$$
|
awk
'{print($4);}'
|
tail
-n1
)
## only export the functions for bash, as this does not work
## only export the functions for bash, as this does not work
...
...
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