diff --git a/CHANGELOG.md b/CHANGELOG.md index 51906ca..7f21d53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Deprecated +## [1.2.0] - 2025-08-18 + +### Changed + +- Add option in `local_get()` in `Remote_utils.pm` to allow symbolic links instead of copies + ## [1.1.0] - 2025-04-15 ### Added diff --git a/Remote_utils.pm b/Remote_utils.pm index 751c41b..bdd3465 100755 --- a/Remote_utils.pm +++ b/Remote_utils.pm @@ -2409,16 +2409,23 @@ sub local_get{ ( $remote_id, $remote_machine, $remote_file ) = @_[0..2]; } - if ($options{"preserve"}) { - $cmd = "cp -p $remote_file $local_file"; + if ($options{"links"}) { + $cmd = "ln -s $remote_file $local_file"; print "cmd = $cmd\n"; system($cmd); $retcode = $? >> 8; if ($retcode) { $cp_ok = 0 } else { $cp_ok = 1 } + } elsif ($options{"preserve"}) { + $cmd = "cp -p $remote_file $local_file"; + print "cmd = $cmd\n"; + system($cmd); + $retcode = $? >> 8; + if ($retcode) { $cp_ok = 0 } + else { $cp_ok = 1 } } else { - print "cmd = copy( $remote_file, $local_file )\n"; - $cp_ok = copy( $remote_file, $local_file ); + print "cmd = copy( $remote_file, $local_file )\n"; + $cp_ok = copy( $remote_file, $local_file ); } return( $cp_ok );