Skip to content

Commit

Permalink
Warn user if sourcing other tags than deprecated-rhel7 on RHEL7 from csh
Browse files Browse the repository at this point in the history
  • Loading branch information
HakonSohoel committed Nov 12, 2024
1 parent 944acf1 commit 72b576b
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions komodo/data/activator_switch.csh.tmpl
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
{% if py_version == "py38" -%}
if ( `uname -r` =~ *el7* ) then
setenv KOMODO_ROOT {{ prefix }}
set KOMODO_RELEASE_REAL = "{{ release }}"
# Get the last command executed wich contains the full path of the sourced script
set lastCommandExecuted = ($_)
if ( "$lastCommandExecuted" =~ "*deprecated-rhel7*" ) then
setenv KOMODO_ROOT {{ prefix }}
set KOMODO_RELEASE_REAL = "{{ release }}"

source $KOMODO_ROOT/$KOMODO_RELEASE_REAL-rhel7/enable.csh
if ( $?_KOMODO_OLD_PROMPT ) then
set prompt = "[$KOMODO_RELEASE_REAL] $_KOMODO_OLD_PROMPT"
source $KOMODO_ROOT/$KOMODO_RELEASE_REAL-rhel7/enable.csh
if ( $?_KOMODO_OLD_PROMPT ) then
set prompt = "[$KOMODO_RELEASE_REAL] $_KOMODO_OLD_PROMPT"
endif
setenv KOMODO_RELEASE $KOMODO_RELEASE_REAL
else
echo -e "{{ migration_warning }}"
endif
setenv KOMODO_RELEASE $KOMODO_RELEASE_REAL
else if ( `uname -r` =~ *el8* ) then
setenv KOMODO_ROOT {{ prefix }}
set KOMODO_RELEASE_REAL = "{{ release }}"
Expand Down

0 comments on commit 72b576b

Please sign in to comment.