Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Pmodules
buildblocks
Commits
9e7255fa
Commit
9e7255fa
authored
Mar 11, 2015
by
gsell
Browse files
file for csh support added, still not usable
parent
8f3edefc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
131 additions
and
0 deletions
+131
-0
scripts/Bootstrap/Pmodules/csh
scripts/Bootstrap/Pmodules/csh
+45
-0
scripts/Bootstrap/Pmodules/environment.csh
scripts/Bootstrap/Pmodules/environment.csh
+17
-0
scripts/Bootstrap/Pmodules/profile.csh
scripts/Bootstrap/Pmodules/profile.csh
+69
-0
No files found.
scripts/Bootstrap/Pmodules/csh
0 → 100644
View file @
9e7255fa
if ($?tcsh) then
set modules_shell="tcsh"
else
set modules_shell="csh"
endif
set exec_prefix='/usr/bin'
set prefix=""
set postfix=""
if ( $?histchars ) then
set histchar = `echo $histchars | cut -c1`
set _histchars = $histchars
set prefix = 'unset histchars;'
set postfix = 'set histchars = $_histchars;'
else
set histchar = \!
endif
if ($?prompt) then
set prefix = "$prefix"'set _prompt="$prompt";set prompt="";'
set postfix = "$postfix"'set prompt="$_prompt";unset _prompt;'
endif
if ($?noglob) then
set prefix = "$prefix""set noglob;"
set postfix = "$postfix""unset noglob;"
endif
set postfix = "set _exit="'$status'"; $postfix; test 0 = "'$_exit;'
alias module $prefix'eval `'$exec_prefix'/modulecmd '$modules_shell' '$histchar'*`; '$postfix
unset exec_prefix
unset prefix
unset postfix
setenv MODULESHOME /usr/share/Modules
if (! $?MODULEPATH ) then
setenv MODULEPATH `sed -n 's/[ #].*$//; /./H; $ { x; s/^\n//; s/\n/:/g; p; }' ${MODULESHOME}/init/.modulespath`
endif
if (! $?LOADEDMODULES ) then
setenv LOADEDMODULES ""
endif
scripts/Bootstrap/Pmodules/environment.csh
0 → 100755
View file @
9e7255fa
#!/bin/tcsh
setenv PSI_PREFIX "/opt/psi"
if ( "$PMODULES_VERSION" == "" ) then
setenv PMODULES_VERSION "0.99.1"
endif
setenv PMODULES_HOME "$PSI_PREFIX/Tools/Pmodules/$PMODULES_VERSION"
setenv PSI_CONFIG_DIR "config"
setenv PSI_MODULES_ROOT 'modulefiles'
setenv PSI_TEMPLATES_DIR 'templates'
setenv PSI_DEFAULT_FAMILIES 'Tools Programming'
setenv PSI_RELEASES ':unstable:stable:deprecated:'
setenv PSI_USED_RELEASES 'stable'
scripts/Bootstrap/Pmodules/profile.csh
0 → 100755
View file @
9e7255fa
#!/bin/tcsh
#############################################################################
# read Pmodules configuration
#
set _init_env_file="/opt/psi/config/environment.bash"
if ( ! -r "$_init_env_file" ); then
echo "Oops: cannot initialize Modules!"
echo "$_init_env_file: file does not exist or is not readable."
return 1
fi
source "$_init_env_file"
unset _init_env_file
############################################################################
# check configuration
#
if ( ! $?PSI_PREFIX ) then
echo "Oops: Pmodules prefix not set."
return 1
endif
if ( "$PSI_PREFIX" == "" ) then
echo "Oops: Pmodules prefix set to empty string!"
endif
if ( ! -d ${PSI_PREFIX} ) then
echo "Oops: ${PSI_PREFIX}: Set as Pmodules prefix, but this is not a directory!"
return 1
endif
if ( ! $?PMODULES_VERSION ) then
echo "Oops: Pmodules version not set!"
return 1
endif
if ( "$PMODULES_VERSION" == "" ) then
echo "Oops: Pmodules version set to empty string!"
return 1
endif
if ( $?PMODULES_HOME ) then
echo "Oops: Pmodules home not set!"
return 1
endif
if ( "$PMODULES_HOME" == "" ) then
echo "Oops: Pmodules home set to empty string!"
return 1
fi
if ( ! -d "$PMODULES_HOME" ) then
echo "Oops: $PMODULES_HOME: Set as Pmodules home, but this is not a directory!"
return 1
endif
############################################################################
# inititialize Pmodules for bash
#
set _init_csh="$PMODULES_HOME/init/csh"
if ( ! -r "$_init_csh" ) then
echo "Oops: cannot initialize Modules!"
echo "$_init_csh: File does not exist or is not readable."
return 1
fi
source "$_init_csh"
unset _init_csh
# Local Variables:
# mode: csh
# sh-basic-offset: 8
# tab-width: 8
# End:
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment