From 4039cfab3deaf9d4a955d56328caf06158557aa2 Mon Sep 17 00:00:00 2001 From: Wilson Liu <wliu5@unimelb.edu.au> Date: Mon, 1 Jun 2020 16:25:46 +1000 Subject: [PATCH] updated spartan module file to enable module description. --- src/main/scripts/unix/module/module-file | 53 ------------------- .../unix/module/unimelb-mf-clients-current | 18 +++++++ .../module/unimelb-mf-clients-current.lua | 24 +++++++++ 3 files changed, 42 insertions(+), 53 deletions(-) delete mode 100644 src/main/scripts/unix/module/module-file create mode 100644 src/main/scripts/unix/module/unimelb-mf-clients-current create mode 100644 src/main/scripts/unix/module/unimelb-mf-clients-current.lua diff --git a/src/main/scripts/unix/module/module-file b/src/main/scripts/unix/module/module-file deleted file mode 100644 index fd43645..0000000 --- a/src/main/scripts/unix/module/module-file +++ /dev/null @@ -1,53 +0,0 @@ -#%Module1.0 -# -# unimelb-mf-clients modulefile -# - -################################################################################# -# Installation: # -# # -# 1) You must install unimelb-mf-clients first. # -# 2) You must validate the root directory of unimelb-mf-clients in this # -# module file, and correct it if invalid. # -# 3) You must validate the Java module name and correct it if needed. # -# 4) You need to install this module file to a directory included in # -# $MODULEPATH environment variable. Otherwise you need to add the # -# (parent) directory of module file directory to $MODULEPATH, suppose # -# you install the module file to $HOME/.modules/unimelb-mf-clients/0.0.5 # -# where 0.0.5 is the module file name, you can use the commands below: # -# # -# mkdir -p $HOME/.modules/unimelb-mf-clients # -# cp bin/module/module-file $HOME/.modules/unimelb-mf-clients/0.0.5 # -# module use $HOME/.modules/unimelb-mf-clients/0.0.5 # -# # -# # -# 5) Now you should be able to load the module: # -# module load unimelb-mf-clients # -################################################################################# - -proc ModulesHelp { } { - puts stderr "This module 1) prepend unimelb-mf-clients/bin to PATH environment variable;" - puts stderr " 2) check and load pre-requisite Java module." -} - - -module-whatis "Module to setup environment for unimelb-mf-clients." - -# make sure it does not load more than once -conflict unimelb-mf-clients - -# load java module (NOTE: you may need to change "Java" to the actual Java module name if it differs.) -# Not required if install the package with JVM. -# module load Java - -# the root directory (NOTE: you need to change it to the actual installed directory.) -set root /opt/unimelb-mf-clients-0.0.5 - -# set PATH environment variable -prepend-path PATH $root/bin/unix - -# export environment variable: MFLUX_ATERM (This is optional.) -setenv MFLUX_ATERM $root/lib/aterm.jar - - - diff --git a/src/main/scripts/unix/module/unimelb-mf-clients-current b/src/main/scripts/unix/module/unimelb-mf-clients-current new file mode 100644 index 0000000..f9b661c --- /dev/null +++ b/src/main/scripts/unix/module/unimelb-mf-clients-current @@ -0,0 +1,18 @@ +#%Module + +proc ModulesHelp { } { + puts stderr { unimelb-mf-clients is a collection of command-line tools to transfer data to/from Mediaflux, the data management platform operated by Research Computing Services. - Homepage: https://wiki-rcs.unimelb.edu.au/display/RCS/Unimelb+Command-Line+Clients } +} + +module-whatis {unimelb-mf-clients is a collection of command-line tools to transfer data to/from Mediaflux, the data management platform operated by Research Computing Services. - Homepage: https://wiki-rcs.unimelb.edu.au/display/RCS/Unimelb+Command-Line+Clients} + +conflict unimelb-mf-clients + +module load Java/1.8.0_152 + +set root /data/cephfs/unimelb-mf-clients/current + +prepend-path PATH $root/bin/unix + + + diff --git a/src/main/scripts/unix/module/unimelb-mf-clients-current.lua b/src/main/scripts/unix/module/unimelb-mf-clients-current.lua new file mode 100644 index 0000000..eb4cf38 --- /dev/null +++ b/src/main/scripts/unix/module/unimelb-mf-clients-current.lua @@ -0,0 +1,24 @@ +help([==[ + +Description +=========== +unimelb-mf-clients is a collection of command-line tools to transfer data to/from Mediaflux, the data management platform operated by Research Computing Services. + +More information +================ + - Homepage: https://wiki-rcs.unimelb.edu.au/display/RCS/Unimelb+Command-Line+Clients +]==]) + +whatis([==[Description: unimelb-mf-clients is a collection of command-line tools to transfer data to/from Mediaflux, the data management platform operated by Research Computing Services.]==]) +whatis([==[Homepage: https://wiki-rcs.unimelb.edu.au/display/RCS/Unimelb+Command-Line+Clients]==]) + +local root = "/data/cephfs/unimelb-mf-clients/current/" + +conflict("unimelb-mf-clients") + +if not isloaded("Java/1.8.0_152") then + load("Java/1.8.0_152") +end + +prepend_path("PATH", pathJoin(root, "bin/unix")) + -- GitLab