Skip to content

Commit

Permalink
i think new bidsmerge is fine
Browse files Browse the repository at this point in the history
  • Loading branch information
dmd committed Mar 28, 2024
1 parent 9fea10f commit fe9d98b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 34 deletions.
15 changes: 3 additions & 12 deletions bidsmerge
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Extremly simplistic tool to merge subjects from one BIDS directory into another
# Extremly simplistic tool to merge one BIDS directory into another

if [ "$#" -ne 2 ] || ! [ -d "$1" ] || ! [ -d "$2" ]; then
echo "Usage: $0 SOURCEDIR DESTDIR" >&2
Expand All @@ -18,14 +18,5 @@ for d in ${SOURCE} ${DEST}; do
fi
done

mkdir -p "${DEST}"/sourcedata/ \
"${DEST}"/derivatives/freesurfer/fsaverage/ \
"${DEST}"/derivatives/fmriprep/logs/

mv -v "${SOURCE}"/sub-* "${DEST}"/
mv -v "${SOURCE}"/sourcedata/sub-* "${DEST}"/sourcedata/
mv -v "${SOURCE}"/derivatives/freesurfer/sub-* "${DEST}"/derivatives/freesurfer/ 2>/dev/null
mv -v "${SOURCE}"/derivatives/fmriprep/sub-* "${DEST}"/derivatives/fmriprep/ 2>/dev/null

rsync -a --no-t --remove-source-files "${SOURCE}"/derivatives/fmriprep/logs/ "${DEST}"/derivatives/fmriprep/logs/
rsync -a --no-t --remove-source-files "${SOURCE}"/derivatives/freesurfer/fsaverage/ "${DEST}"/derivatives/freesurfer/fsaverage/
rsync -a --remove-source-files "${SOURCE}"/ "${DEST}"/
find "${SOURCE}" -depth -type d -empty -delete
22 changes: 0 additions & 22 deletions bidsmerge2

This file was deleted.

0 comments on commit fe9d98b

Please sign in to comment.