Skip to content

Commit

Permalink
update info about gunzip (#547)
Browse files Browse the repository at this point in the history
  • Loading branch information
Remi-Gau authored Apr 27, 2023
1 parent bbd2b4f commit 6e65b0a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 4 additions & 2 deletions +bids/copy_to_derivative.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ function copy_to_derivative(varargin)
%
% :param unzip: If ``true`` then all ``.gz`` files will be unzipped
% after being copied.
% For MacOS and Unix system, this will require a
% version of gunzip >= 1.6.
% :type unzip: logical
%
% :param force: If set to ``false`` it will not overwrite any file already
Expand Down Expand Up @@ -304,9 +306,9 @@ function copy_with_symlink(src, target, unzip_files, verbose)
if isunix

if unzip_files && is_gunzipped(src)
command = sprintf('gunzip -kfc %s > %s', src, target(1:end - 3));
command = sprintf('gunzip --keep --force --stdout %s > %s', src, target(1:end - 3));
else
command = sprintf('cp -R -L -f %s %s', src, target);
command = sprintf('cp --recursive --dereference --force %s %s', src, target);
end

status = system(command);
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<!-- markdown-link-check-enable -->

- [BIDS for MATLAB / Octave](#bids-for-matlab--octave)
- [Requirements](#requirements)
- [Installation](#installation)
- [Get the latest features](#get-the-latest-features)
- [Features](#features)
Expand All @@ -22,7 +23,7 @@
- [What will this toolbox most likely never do](#what-will-this-toolbox-most-likely-never-do)
- [Usage](#usage)
- [Demos](#demos)
- [Requirements](#requirements)
- [Requirements](#requirements-1)
- [Reading and writing JSON files](#reading-and-writing-json-files)
- [Implementation](#implementation)
- [Get in touch](#get-in-touch)
Expand All @@ -39,6 +40,11 @@ For more information about BIDS, visit https://bids.neuroimaging.io/.
See also [PyBIDS](https://github.com/bids-standard/pybids) for Python and the
[BIDS Starter Kit](https://github.com/bids-standard/bids-starter-kit).

## Requirements

For MacOS and Unix system, using `bids.copy_to_derivative` requires
a version of gunzip >= 1.6.

## Installation

Download, unzip this repository and add its content to the MATLAB/Octave path.
Expand Down

0 comments on commit 6e65b0a

Please sign in to comment.