Skip to content

Commit

Permalink
updated version number, changed the removal code of the tmp files bec…
Browse files Browse the repository at this point in the history
…ause when people have rm aliased to rm -v they saw a lot of 'removed blah' messages while using modules
  • Loading branch information
Frederik Delaere committed Oct 2, 2017
1 parent 268e559 commit 37586ff
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rsmodules"
version = "0.5.5"
version = "0.5.6"
authors = ["Frederik Delaere <[email protected]>"]

[dependencies]
Expand Down
4 changes: 3 additions & 1 deletion setup_rsmodules.csh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ if ( -f ~/.rsmodules_autoload ) then
endif

# cleanup old tmp files from crashed rsmodules sessions
find ~/.rsmodulestmp* -mtime +1 -exec rm -f {} \; >& /dev/null
find ~/.rsmodulestmp* -mtime +1 -delete >& /dev/null
# also cleanup empty tmp files
find ~/.rsmodulestmp* -empty -delete >& /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
4 changes: 3 additions & 1 deletion setup_rsmodules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ if [ -f ~/.rsmodules_autoload ]; then
fi

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

if [ ${BASH_VERSINFO:-0} -ge 3 ]; then
#
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ fn run(args: &Vec<String>) {
// if it crashes we still need to delete the file


let cmd = format!("rm -f {}\n", tmp_file_path.display());
let cmd = format!("\\rm -f {}\n", tmp_file_path.display());

let mut output_buffer = OUTPUT_BUFFER.lock().unwrap();
let ref mut output_buffer = *output_buffer;
Expand Down

0 comments on commit 37586ff

Please sign in to comment.