Skip to content

Commit

Permalink
Merge pull request #68 from nmfs-opensci/dev
Browse files Browse the repository at this point in the history
fix texlive and clean desktop
  • Loading branch information
eeholmes authored Oct 21, 2024
2 parents 78e8013 + 03848fa commit 684397c
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
1 change: 1 addition & 0 deletions Desktop/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is a folder Desktop apps files: .desktop, .xml, .png
6 changes: 4 additions & 2 deletions appendix
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ ENV R_DOCKERFILE="verse_${R_VERSION}"
RUN PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin && \
chmod +x ${REPO_DIR}/rocker.sh && \
${REPO_DIR}/rocker.sh
# Missing some basic tex packages
RUN tlmgr install collection-latexrecommended && tlmgr clean --all

# Install extra cmd line packages after R installation
# The package_list part is reading the file and doing clean-up to just have the list of packages
Expand All @@ -28,5 +26,9 @@ RUN yes | unminimize
ENV MANPATH="${NB_PYTHON_PREFIX}/share/man:${MANPATH}"
RUN mandb

# Copy Desktop files into ${REPO_DIR}/Desktop if they exist
ONBUILD RUN mkdir -p ${REPO_DIR}/Desktop && \
if [ -d Desktop ]; then cp Desktop/* ${REPO_DIR}/Desktop/; fi

# Revert to default user
USER ${NB_USER}
1 change: 0 additions & 1 deletion mime/README.md

This file was deleted.

6 changes: 6 additions & 0 deletions rocker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,9 @@ while IFS= read -r line; do
eval "$cmd" # || echo ${cmd}" encountered an error, but continuing..."
fi
done < /rocker_scripts/original.Dockerfile

# Install extra tex packages that are not installed by default
if command -v tlmgr &> /dev/null; then
echo "Installing texlive collection-latexrecommended..."
tlmgr install collection-latexrecommended
fi
10 changes: 7 additions & 3 deletions start
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@ shopt -s nullglob
# build-time.
APPLICATIONS_DIR="${HOME}/.local/share/applications"
DESKTOP_DIR="${HOME}/Desktop"
# Remove DESKTOP_DIR if it exists to avoid leftover files
if [ -d "${DESKTOP_DIR}" ]; then
rm -rf "${DESKTOP_DIR}"
fi
mkdir -p "${APPLICATIONS_DIR}"
mkdir -p "${DESKTOP_DIR}"
for desktop_file_path in ${REPO_DIR}/*.desktop; do
for desktop_file_path in ${REPO_DIR}/Desktop/*.desktop; do
cp "${desktop_file_path}" "${APPLICATIONS_DIR}/."

# Symlink application to desktop
Expand All @@ -30,11 +34,11 @@ for desktop_file_path in ${REPO_DIR}/*.desktop; do
done
update-desktop-database "${APPLICATIONS_DIR}"

# Add MIME Type data from XML files in `mime/` dir to the MIME database.
# Add MIME Type data from XML files to the MIME database.
MIME_DIR="${HOME}/.local/share/mime"
MIME_PACKAGES_DIR="${MIME_DIR}/packages"
mkdir -p "${MIME_PACKAGES_DIR}"
for mime_file_path in ${REPO_DIR}/mime/*.xml; do
for mime_file_path in ${REPO_DIR}/Desktop/*.xml; do
cp "${mime_file_path}" "${MIME_PACKAGES_DIR}/."
done
update-mime-database "${MIME_DIR}"
Expand Down

0 comments on commit 684397c

Please sign in to comment.