Skip to content

Commit a635d88

Browse files
committed
📦 Make symlinks real in FSL 5.0.9-5 installation
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣀⣀⣀⢀⣀⣀⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⣠⠶⠚⠉⠉⠉⠉⠉⠉⠙⠛⠿⣍⣉⠛⢶⣤⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⢀⡴⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠳⢦⣍⠻⣌⠉⠛⠲⢤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⣠⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠳⣬⡑⢤⡀⠀⠀⠙⠳⢶⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⢰⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⢦⡙⠀⠀⠀⠀⠀⠙⠺⡙⢶⣶⠤⣄⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⢸⡿⠶⠤⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢦⠀⠀⠀⠀⠀⠀⠙⢦⡈⢳⡄⠀⠉⠉⠓⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠈⢳⢦⣀⡀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣀⣀⣀⣀⣀⣀⠀⠈⠻⣄⠀⠀⠀⠀⠀⠈⢳⡀⠙⣆⠀⠀⠀⠀⢳⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⢠⡟⠰⠋⠉⠙⠓⠒⠒⠒⠛⠉⠉⠉⢉⣀⣀⣀⠀⠈⠉⠉⠲⢤⣙⣦⡀⢀⠀⠀⠀⠀⢳⡀⠘⢧⠀⠀⠀⠀⢻⡄⠀⠀⠀⠀⢀⣀⣤⡶⣶⣖⣿⣿⠖ ⠀⠀⠀⠀⠀⠀⠀⢸⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠁⠀⠉⢳⡀⠀⠀⠀⠀⢻⠘⢧⡈⣇⠀⠀⠀⠀⢳⠀⠘⣧⠀⠀⠀⠸⡇⣀⡤⢶⡟⣹⣯⠗⠊⢉⡴⠋⠁⠀ ⠀⠀⠀⠀⠀⠀⢀⣞⠀⣠⣤⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠳⠀⠀⠀⠀⣼⠀⠘⣷⠘⡄⠀⠀⠀⠀⣇⠀⢸⡆⠀⣀⡼⠛⠁⣠⡾⠛⠿⢿⣿⡟⠃⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠈⣿⣰⠋⠀⢻⠀⠀⠀⠀⠀⠀⢀⡴⠶⠶⢦⡀⠀⠀⠀⠀⠀⠀⢀⡟⠀⠀⠈⣧⢹⡄⠀⠀⠀⢻⡀⠀⣿⠶⠁⣀⠴⠋⠁⠀⠀⣠⠾⠋⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⣠⣤⣤⣇⣇⣴⣶⣾⠀⠀⠀⠀⠀⣴⠋⠀⠀⠀⠀⣷⡀⠀⠀⠀⠀⠀⣸⠁⠀⠀⠀⠹⣆⣻⡄⠀⠀⢸⡇⠀⢿⠖⠚⠁⠀⠀⣀⡴⠊⠁⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⣸⡏⠀⠀⠛⢿⣷⣷⠋⠀⠀⠀⠀⣶⠇⢀⣤⣤⣄⠀⢼⠟⠀⠀⠀⠀⠀⡟⠀⠀⠀⠀⠀⢻⡀⢻⣶⣖⣺⡇⠀⢸⣦⣤⣴⠖⠛⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⢠⡞⠻⣧⠀⠀⠀⠀⠙⠳⣄⡀⠀⠀⠀⣿⠀⣞⣿⣯⣽⣇⡞⠀⠀⠀⠀⠀⢸⠃⠀⠀⠀⠀⠀⠸⡇⠈⢳⠉⢸⡇⠀⢸⠀⢸⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⡿⠀⢠⠙⣧⡀⠀⠀⠀⠀⠈⢳⠀⠀⠀⠻⡖⣿⣿⣿⣿⡟⠀⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⢷⠀⠈⢷⣸⡇⠀⣿⢀⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⢸⣇⠀⠻⡇⠈⠳⣄⠀⠀⠀⢀⣼⠀⠀⠀⠀⠉⠀⠀⠁⠀⠀⠀⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⢸⡀⠀⠈⣿⠀⠀⡟⡾⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠈⣿⡀⠀⠹⡄⠀⠈⠓⠶⠶⠚⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣆⠀⠀⠀⠀⠀⠀⢸⡇⠀⠀⢹⡄⢸⡿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠸⣇⠀⠀⠹⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⢰⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⠿⠖⠲⢶⣄⠀⠀⢸⠇⠀⠀⠘⣷⠟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠹⡆⠀⠀⢻⠙⠲⢤⣄⣀⣀⣀⣀⣠⣤⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣤⣄⡀⠘⡇⠀⣼⠀⠀⠀⠀⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠹⣄⠀⠘⡗⠚⠻⠷⠒⠒⢲⣶⠞⠋⠀⠘⠆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠀⠀⠈⠃⢠⡇⢠⡇⠀⠀⠀⠀⣸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠻⣴⡄⠘⢦⣀⣀⣠⠶⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣄⡀⠀⠀⠀⠀⢀⣴⠟⠀⣼⠁⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠙⣎⠢⢤⣀⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⡼⠛⠒⠶⠶⠚⠋⠁⢀⡴⠃⠀⠀⠀⠀⣸⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠈⠳⢤⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⡤⠤⠶⠚⢋⡟⠛⠓⠒⠶⣶⣒⠚⠛⠉⠀⠀⠀⠀⠀⣰⡟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢉⣩⢭⡉⢉⣩⢿⡏⠀⠀⠀⠀⠀⠀⣼⠛⢦⡀⠀⠀⠀⠉⠉⠓⠒⠶⠶⠖⠒⠋⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⡞⠁⠀⠙⣯⠁⢸⡇⠀⠀⠀⠀⣀⡴⣏⡀⠀⠙⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⢠⣾⠀⠀⠀⠀⢹⡄⠈⠛⠓⠒⢚⣻⡵⠞⠋⠙⣆⠀⠈⠻⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⣀⡤⢾⡏⠀⠀⠀⠀⣠⠟⠛⠛⠶⣤⠾⠋⠀⠀⠀⠀⢹⡆⠀⠀⠀⠙⠶⢤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⣾⠋⠀⣸⠇⠀⠀⠀⢰⡟⠀⠀⠀⣰⠏⠀⠀⠀⠀⠀⠀⢸⡇⠀⠀⠀⠀⠀⠀⠈⠙⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⣿⠀⣸⡿⠀⠀⠀⣠⢿⡇⠀⠀⢠⡏⠀⠀⠀⠀⠀⠀⠀⣾⠃⠀⠀⠀⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠙⢶⡇⠀⠀⠤⠚⠁⣨⣧⠀⠀⡟⢧⠀⠀⠀⠀⠀⠀⡄⣿⠀⠀⠀⠀⠀⠀⠀⠀⢰⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⡿⠀⠀⠀⢀⡠⢚⡽⠛⠦⣼⡇⠘⣧⠀⠀⠀⠀⠀⣧⠇⠀⠀⠀⠀⠀⠀⠀⣠⡿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⢸⡇⠀⣠⠞⠋⣰⠞⠁⠀⠀⠈⣷⡀⠈⠀⠀⠀⠀⠐⣿⠀⠀⠀⠀⠀⠀⣠⡾⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠸⣗⣿⣥⡴⠛⠁⠀⠀⠀⠀⠀⢸⡇⠀⠀⠀⠀⠀⠀⡟⠒⠶⠶⠖⠒⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠉⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⡄⠀⠀⠀⠀⠀⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢷⡀⠀⠀⠀⢰⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢦⣄⣠⣟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ [rebuild FSL.5.0.9-5.neurodebian-xenial]
1 parent a4677fe commit a635d88

File tree

3 files changed

+28
-4
lines changed

3 files changed

+28
-4
lines changed

.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
!.github/scripts
21
bids-examples
32
.circleci
43
cpac_runs
54
.env*
65
.git
76
.github
7+
!.github/scripts
88
*.tar.gz

.github/Dockerfiles/FSL.5.0.9-5.neurodebian-xenial.Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,15 @@ USER root
2020

2121
ARG DEBIAN_FRONTEND=noninteractive
2222

23+
COPY .github/scripts/make_real.sh /
24+
2325
# install FSL
2426
RUN 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
3134
ENV FSLDIR=/usr/share/fsl/5.0 \
@@ -62,8 +65,8 @@ COPY --from=FSL /usr/lib/libznz.so.2 /usr/lib/libznz.so.2
6265
COPY --from=FSL /usr/share/doc/fsl-core /usr/share/doc/fsl-core
6366
COPY --from=FSL /usr/share/man/man1/fsl-5.0-core.1.gz /usr/share/man/man1/
6467
COPY --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/
6770
COPY --from=FSL /usr/share/fsl /usr/share/fsl
6871
# install C-PAC resources into FSL
6972
COPY --from=data /fsl_data/standard /usr/share/fsl/5.0/data/standard

.github/scripts/make_real.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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

0 commit comments

Comments
 (0)