Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to modify env with ${PROJECT_SOURCE}/workspace.rc on workspace startup #22

Merged
merged 2 commits into from
Jul 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion modules/developer-base/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ echo "${USER}:${START_ID}:2147483646" > /etc/subgid
# Setup $PS1 for a consistent and reasonable prompt
if [ -w "${HOME}" ] && [ ! -f "${HOME}"/.bashrc ]; then
echo "PS1='[\u@\h \W]\$ '" > "${HOME}"/.bashrc
(echo "if [ -f ${PROJECT_SOURCE}/workspace.rc ]"; echo "then"; echo " . ${PROJECT_SOURCE}/workspace.rc"; echo "fi") > ${HOME}/.bashrc
fi

if [ ! -f ${HOME}/.zshrc ]
if [ -w "${HOME}" ] && [ ! -f ${HOME}/.zshrc ]
then
(echo "HISTFILE=${HOME}/.zsh_history"; echo "HISTSIZE=1000"; echo "SAVEHIST=1000") > ${HOME}/.zshrc
(echo "if [ -f ${PROJECT_SOURCE}/workspace.rc ]"; echo "then"; echo " . ${PROJECT_SOURCE}/workspace.rc"; echo "fi") >> ${HOME}/.zshrc
fi

podman login -u $(oc whoami) -p $(oc whoami -t) image-registry.openshift-image-registry.svc:5000
Expand Down
Loading