Commit 39807903 authored by Borreguero Calvo, Jose's avatar Borreguero Calvo, Jose Committed by Peterson, Peter
Browse files

utility function to remove the font cache

parent 9b4d053f
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -5,6 +5,15 @@ CONDA_ACTIVATE_SCRIPT="${CONDA_PREFIX_CENTRAL}/bin/activate"
# several places have conda installed in /usr/local and link it over
CONDA_PREFIX_ALT="/usr/local/anaconda"

########## Utility functions
_remove_font_cache() {
  # remove the font cache in the user's home directory
  # this is needed to avoid problems with the font cache and the Qt versions of old Mantid versions
  if [ -d "${HOME}/.cache/fontconfig" ]; then
    rm -f "${HOME}/.cache/fontconfig/*"
  fi
}

########## Connect to central conda command
_activate_conda_cmd() {
  if [ -f "${CONDA_ACTIVATE_SCRIPT}" ]; then
@@ -82,6 +91,7 @@ activate_and_launch() {
    shift
    # the rest is passed to the command being started

    _remove_font_cache
    activate_conda_environment "${CONDA_EXP_ENV}"

    echo "Execute: ${COMMAND} $*"
+4 −1
Original line number Diff line number Diff line
%global srcname nsd-app-wrap

Name:           nsd-app-wrap
Version:        1.37
Version:        1.38
Release:        1%{?dist}
Summary:        Wrapper scripts to launch python applications installed via anaconda
Vendor:         Peter F. Peterson
@@ -68,6 +68,9 @@ install -m 644 jupyter.local.desktop %{buildroot}%{_datadir}/applications/
%license LICENSE

%changelog
* Fri Apr 14 2023 Jose Borreguero
- Utility function to remove the user's font cache

* Tue Feb 28 2023 Ross Whitfield
- Add shiver