Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix texlive and clean desktop #68

Merged
merged 13 commits into from
Oct 21, 2024
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