Skip to content

Commit

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

[rebuild FSL.5.0.9-5.neurodebian-xenial]
  • Loading branch information
shnizzedy committed Jun 15, 2023
1 parent a4677fe commit a635d88
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
!.github/scripts
bids-examples
.circleci
cpac_runs
.env*
.git
.github
!.github/scripts
*.tar.gz
9 changes: 6 additions & 3 deletions .github/Dockerfiles/FSL.5.0.9-5.neurodebian-xenial.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,15 @@ USER root

ARG DEBIAN_FRONTEND=noninteractive

COPY .github/scripts/make_real.sh /

# install FSL
RUN apt-get update && \
apt-get install -y --no-install-recommends \
fsl-core=5.0.9-5~nd16.04+1 \
fsl-atlases \
fsl-mni152-templates=5.0.7-2
fsl-mni152-templates=5.0.7-2 && \
/make_real.sh "/usr/share/fsl/5.0/data"

# setup FSL environment
ENV FSLDIR=/usr/share/fsl/5.0 \
Expand Down Expand Up @@ -62,8 +65,8 @@ COPY --from=FSL /usr/lib/libznz.so.2 /usr/lib/libznz.so.2
COPY --from=FSL /usr/share/doc/fsl-core /usr/share/doc/fsl-core
COPY --from=FSL /usr/share/man/man1/fsl-5.0-core.1.gz /usr/share/man/man1/
COPY --from=FSL /usr/share/man/man1/fsl.1.gz /usr/share/man/man1/
COPY --from=FSL /usr/share/data/fsl-mni152-templates /usr/share/data/fsl-mni152-templates
COPY --from=FSL /usr/share/doc/fsl-mni152-templates /usr/share/doc/fsl-mni152-templates
COPY --from=FSL /usr/share/data/fsl-* /usr/share/data/
COPY --from=FSL /usr/share/doc/fsl-* /usr/share/doc/
COPY --from=FSL /usr/share/fsl /usr/share/fsl
# install C-PAC resources into FSL
COPY --from=data /fsl_data/standard /usr/share/fsl/5.0/data/standard
Expand Down
21 changes: 21 additions & 0 deletions .github/scripts/make_real.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

# Function to convert symlinked subpaths to real paths
convert_symlinks() {
# Iterate over all items (files and directories) in the current directory
for ITEM in "$1"/*; do
echo $ITEM
if [[ -L "$ITEM" ]]; then
# If the item is a symlink, convert it to a real path
TARGET=$(readlink -f "$ITEM")
rm "$ITEM"
cp -r "$TARGET" "$ITEM"
echo "Converted symlink to real path: $ITEM"
elif [[ -d "$ITEM" ]]; then
# If the item is a directory, recursively call the function on it
convert_symlinks "$ITEM"
fi
done
}

convert_symlinks $1

0 comments on commit a635d88

Please sign in to comment.