Skip to content
Snippets Groups Projects
Commit 82f2974f authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

feat: motd

parent 62782f69
No related branches found
No related tags found
1 merge request!513feat: motd
#!/bin/bash
news=$HOME/.eic-news
# run only if stdin and sterr
if [[ -t 0 && -t 2 && ! -f $HOME/.hushlogin && -f $news ]] ; then
if [[ $- == *i* ]] ; then
# sourced: print once a day
if [[ -z $(find $HOME/.eic-news -atime -1) ]] ; then
cat $news
fi
else
# else: print always
cat $news
fi
# update once a day
if [[ -z $(find $HOME/.eic-news -mtime -1) ]] ; then
(&>/dev/null curl --silent --connect-timeout 5 --location https://eic.github.io/motd --output $news &)
fi
fi
......@@ -140,5 +140,10 @@ RUN --mount=type=cache,target=/ccache/,sharing=locked,id=${TARGETPLATFORM}
&& ccache --show-stats \
&& rm /tmp/setup_detectors.py
## eic-news
COPY --chmod=0755 eic-news /usr/local/bin/eic-news
RUN echo "test -f $HOME/.eic-news && source /usr/local/bin/eic-news" \
> /etc/profile.d/z13_eic-news.sh
## Hotfix for misbehaving OSG nodes
RUN mkdir /hadoop
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment