Skip to content
Snippets Groups Projects
Commit bbaee3c7 authored by Sylvester Joosten's avatar Sylvester Joosten
Browse files

Ps1 preamble

parent 6c2680e8
No related branches found
No related tags found
1 merge request!163Ps1 preamble
...@@ -270,7 +270,7 @@ jug_xl:nightly: ...@@ -270,7 +270,7 @@ jug_xl:nightly:
- docker build -t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:${NIGHTLY_TAG} - docker build -t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:${NIGHTLY_TAG}
-f containers/jug/xl.Dockerfile -f containers/jug/xl.Dockerfile
--build-arg INTERNAL_TAG=${INTERNAL_TAG} --build-arg INTERNAL_TAG=${INTERNAL_TAG}
--build-arg JUG_VERSION=nightly-$(date +%Y-%m-%d_%H-%M-%S)-$(git rev-parse HEAD) --build-arg JUG_VERSION=nightly-$(date +%Y-%m-%d_%H-%M-%S)-${INTERNAL_TAG}-$(git rev-parse HEAD)
containers/jug containers/jug
- | - |
PUSH_FLAG="" PUSH_FLAG=""
......
...@@ -6,8 +6,37 @@ for i in /etc/profile.d/*.sh; do ...@@ -6,8 +6,37 @@ for i in /etc/profile.d/*.sh; do
fi fi
done done
export PS1='eic-shell> \[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' ## default PS1 preamble in case we can't find better info
PS1_PREAMBLE='eic-shell> '
## try to guess who we are
## note: we use sigils for the following cases:
## - no sigil for nightly builds (jug_xl> )
## - (*) for master builds (jug_xl*> )
## - (+) for stable (versioned) (jug_xl+> )
## - (?) for unstable (MR) (jug_xl?> )
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 =~ 'testing' ]]; then
sigil="*"
elif [[ $version =~ 'nightly' ]]; then
sigil=""
else # stable
sigil="+"
fi
PS1_PREAMBLE="${container}${sigil}> "
unset sigil
fi
unset version
unset container
fi
export PS1=${PS1_PREAMBLE}'\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
export LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33' export LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33'
unset PS1_PREAMBLE
## redefine ls and less as functions, as this is something we ## redefine ls and less as functions, as this is something we
## can import into our plain bash --norc --noprofile session ## can import into our plain bash --norc --noprofile session
......
...@@ -143,3 +143,4 @@ RUN mkdir -p /opt/campaigns ...@@ -143,3 +143,4 @@ RUN mkdir -p /opt/campaigns
https://eicweb.phy.anl.gov/EIC/campaigns/condor.git \ https://eicweb.phy.anl.gov/EIC/campaigns/condor.git \
&& git clone -b ${CAMPAIGNS_SLURM_VERSION} --depth 1 \ && git clone -b ${CAMPAIGNS_SLURM_VERSION} --depth 1 \
https://eicweb.phy.anl.gov/EIC/campaigns/slurm.git https://eicweb.phy.anl.gov/EIC/campaigns/slurm.git
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment