1 parent
67e979c591
commit
da4f047c37
2 files changed
+24
-6
No files matched your search
@@ -1,9 +1,5 @@
|
||||
#/bin/bash
|
||||
#source bpy-default.sh
|
||||
#!/bin/bash
|
||||
source bpy-env
|
||||
|
||||
#unset SESSION_MANAGER # for qt error message in ipython
|
||||
|
||||
#ipython --pylab --profile=eco --no-banner -i -c "run /sf/bernina/config/src/python/eco/startup_inline_new.py -l -s bernina"
|
||||
ipython --profile=eco --no-banner -i -c "run /sf/bernina/code/gac-bernina/eco/startup_inline_new.py -l -s bernina"
|
||||
eco "$@"
|
||||
|
||||
@@ -69,6 +69,28 @@ done
|
||||
command -v "$PIXI_BIN" >/dev/null 2>&1 || PIXI_BIN="pixi"
|
||||
command -v "$PIXI_BIN" >/dev/null 2>&1 || { echo "error: pixi not found" >&2; exit 1; }
|
||||
|
||||
# Only RHEL9+ consoles are supported: the shared pixi.lock's builds
|
||||
# aren't verified against RHEL8's older system libraries, and bernina
|
||||
# consoles are mid-migration from RHEL8 to RHEL9. On anything older,
|
||||
# clean up any local mirror a pre-this-check attempt may have left
|
||||
# behind and do nothing else -- no install, no loop.
|
||||
os_id="" os_major=""
|
||||
if [ -r /etc/os-release ]; then
|
||||
os_id=$(. /etc/os-release 2>/dev/null; echo "$ID")
|
||||
os_major=$(. /etc/os-release 2>/dev/null; echo "${VERSION_ID%%.*}")
|
||||
fi
|
||||
if [ "$os_id" != "rhel" ] || [ -z "$os_major" ] || [ "$os_major" -lt 9 ] 2>/dev/null; then
|
||||
if [ -d "$LOCAL_DIR" ]; then
|
||||
echo "$(date '+%F %T') $(hostname) is not RHEL9+ (detected: ${os_id:-unknown} ${os_major:-?}) -- removing local pixi env remnant at $LOCAL_DIR"
|
||||
rm -rf "$LOCAL_DIR"
|
||||
command -v notify-send >/dev/null 2>&1 && notify-send -u normal "Local python env (bpy)" \
|
||||
"Removed $LOCAL_DIR: this host (${os_id:-unknown} ${os_major:-?}) isn't RHEL9+, so it isn't supported." 2>/dev/null
|
||||
else
|
||||
echo "$(date '+%F %T') $(hostname) is not RHEL9+ (detected: ${os_id:-unknown} ${os_major:-?}) -- nothing to do"
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Singleton per host+user: startup_bernina_terminal launches this on every
|
||||
# terminal open, and it's also handy to run by hand -- only one loop
|
||||
# should ever actually be checking/installing at a time.
|
||||
|
||||
Reference in new issue
Block a user