File tree Expand file tree Collapse file tree 3 files changed +28
-4
lines changed Expand file tree Collapse file tree 3 files changed +28
-4
lines changed Original file line number Diff line number Diff line change 1- ! .github /scripts
21bids-examples
32.circleci
43cpac_runs
54.env *
65.git
76.github
7+ ! .github /scripts
88* .tar.gz
Original file line number Diff line number Diff line change @@ -20,12 +20,15 @@ USER root
2020
2121ARG DEBIAN_FRONTEND=noninteractive
2222
23+ COPY .github/scripts/make_real.sh /
24+
2325# install FSL
2426RUN apt-get update && \
2527 apt-get install -y --no-install-recommends \
2628 fsl-core=5.0.9-5~nd16.04+1 \
2729 fsl-atlases \
28- fsl-mni152-templates=5.0.7-2
30+ fsl-mni152-templates=5.0.7-2 && \
31+ /make_real.sh "/usr/share/fsl/5.0/data"
2932
3033# setup FSL environment
3134ENV FSLDIR=/usr/share/fsl/5.0 \
@@ -62,8 +65,8 @@ COPY --from=FSL /usr/lib/libznz.so.2 /usr/lib/libznz.so.2
6265COPY --from=FSL /usr/share/doc/fsl-core /usr/share/doc/fsl-core
6366COPY --from=FSL /usr/share/man/man1/fsl-5.0-core.1.gz /usr/share/man/man1/
6467COPY --from=FSL /usr/share/man/man1/fsl.1.gz /usr/share/man/man1/
65- COPY --from=FSL /usr/share/data/fsl-mni152-templates /usr/share/data/fsl-mni152-templates
66- COPY --from=FSL /usr/share/doc/fsl-mni152-templates /usr/share/doc/fsl-mni152-templates
68+ COPY --from=FSL /usr/share/data/fsl-* /usr/share/data/
69+ COPY --from=FSL /usr/share/doc/fsl-* /usr/share/doc/
6770COPY --from=FSL /usr/share/fsl /usr/share/fsl
6871# install C-PAC resources into FSL
6972COPY --from=data /fsl_data/standard /usr/share/fsl/5.0/data/standard
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Function to convert symlinked subpaths to real paths
4+ convert_symlinks () {
5+ # Iterate over all items (files and directories) in the current directory
6+ for ITEM in " $1 " /* ; do
7+ echo $ITEM
8+ if [[ -L " $ITEM " ]]; then
9+ # If the item is a symlink, convert it to a real path
10+ TARGET=$( readlink -f " $ITEM " )
11+ rm " $ITEM "
12+ cp -r " $TARGET " " $ITEM "
13+ echo " Converted symlink to real path: $ITEM "
14+ elif [[ -d " $ITEM " ]]; then
15+ # If the item is a directory, recursively call the function on it
16+ convert_symlinks " $ITEM "
17+ fi
18+ done
19+ }
20+
21+ convert_symlinks $1
You can’t perform that action at this time.
0 commit comments