Skip to content

Commit

Permalink
cleanup old tmp files from crashed rsmodule session
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederik Delaere committed Sep 14, 2017
1 parent f448f06 commit 14eec17
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions setup_rsmodules.csh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ if ( -f ~/.rsmodules_autoload ) then
source ~/.rsmodules_autoload
endif

# cleanup old tmp files from crashed rsmodules sessions
find ~/.rsmodulestmp* -mtime +1 -exec rm -f {} \; >& /dev/null

# this should be a function, so everytime it is called the info is updated
set mod_av="`$RSMODULES_INSTALL_DIR/rsmodules noshell avail`"

Expand Down
3 changes: 3 additions & 0 deletions setup_rsmodules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ if [ -f ~/.rsmodules_autoload ]; then
source ~/.rsmodules_autoload
fi

# cleanup old tmp files from crashed rsmodules sessions
find ~/.rsmodulestmp* -mtime +1 -exec rm -f {} \; 2> /dev/null

if [ ${BASH_VERSINFO:-0} -ge 3 ]; then
#
# Bash commandline completion (bash 3.0 and above)
Expand Down

0 comments on commit 14eec17

Please sign in to comment.