Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add lmod_update_system_cache.sh script in contrib #58

Merged
merged 3 commits into from
Apr 2, 2015

Conversation

boegel
Copy link
Contributor

@boegel boegel commented Feb 16, 2015

This script is a rewrite of the existing createSystemCacheFile.sh. I feel this is better organised, and since it allows for verbose debug logging to stdout, it's easier to use.

It now hardcodes a couple of settings, that should be modified. I'll indicate what should be changed by making inline remarks.


# figure out location of Lmod cache and cache timestamp file via 'ml --config'
LMOD_CACHE_DIR=`ml --config 2>&1 | grep -A 2 "Cache Directory" | tail -1 | tr -s ' ' | cut -f1 -d' '`
LMOD_CACHE_TIMESTAMP_FILE=`ml --config 2>&1 | grep -A 2 "Cache Directory" | tail -1 | tr -s ' ' | cut -f2 -d' '`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are good defaults imho, but it should be possible to tweak these

so, these should become LMOD_CACHE_DIR_DEFAULT and LMOD_CACHE_TIMESTAMP_FILE_DEFAULT, and then LMOD_CACHE_DIR and LMOD_CACHE_TIMESTAMP_FILE should be picking up those default values unless they're already defined

@boegel
Copy link
Contributor Author

boegel commented Feb 16, 2015

@rtmclay: thoughts on this?

@rtmclay
Copy link
Member

rtmclay commented Feb 17, 2015

This script need to take arguments to specify the following:

  • The cache directory
  • The time stamp file
  • The part of MODULEPATH that goes in the cache file
  • A debug flag
  • What to build moduleT, dbT, reverseMapT?

I think that it should build moduleT, dbT by default. But it should be able to build the reverseMapT if asked. @boegel: comments?

@rtmclay
Copy link
Member

rtmclay commented Feb 17, 2015

Also there should be an option which says extract the locations from module --config. It should only work when there is only one cache directory and timestamp file.

@boegel boegel mentioned this pull request Mar 11, 2015
8 tasks
@boegel
Copy link
Contributor Author

boegel commented Apr 2, 2015

@rtmclay: I've pushed a new version of the script. There are a couple of minor things I would like to see changed before this is merged in, see the FIXMEs in the script.

Any suggestions for other improvements are welcome, but I like where this is going.

@boegel
Copy link
Contributor Author

boegel commented Apr 2, 2015

@rtmclay: we'll also need to update the README in that directory, the one that's in there now is outdated anyway (the trick with the non-empty timestamp file no longer works, as you informed me)

rtmclay added a commit that referenced this pull request Apr 2, 2015
add lmod_update_system_cache.sh script in contrib
@rtmclay rtmclay merged commit 2256b7b into TACC:master Apr 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants