403Webshell
Server IP : 104.21.84.107  /  Your IP : 104.23.243.196
Web Server : Apache/2.4.63 (Ubuntu)
System : Linux adminpruebas-Virtual-Machine 6.14.0-37-generic #37-Ubuntu SMP PREEMPT_DYNAMIC Fri Nov 14 22:10:32 UTC 2025 x86_64
User : www-data ( 33)
PHP Version : 8.4.5
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /snap/thunderbird/current/snap/hooks/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /snap/thunderbird/current/snap/hooks/post-refresh
#!/bin/sh

# Copyright (C) 2022 Canonical Ltd.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3, as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.

host_hunspell=/var/lib/snapd/hostfs/usr/share/hunspell

if [ ! -d  $host_hunspell ]; then
    echo "No host hunspell, skipping"
    exit 0
fi

DICPATH=$SNAP_COMMON/snap-hunspell

if [ -d "$DICPATH" ]; then
    # Clean up on each refresh to ensure we have an up-to-date list
    # of host dictionaries.
    find "$DICPATH" -type l \( -name "*.dic" -or -name "*.aff" \) -exec rm {} + || true
else
    mkdir -p "$DICPATH"
fi

# We deliberately don't directly use the host dictionary files.
# Instead, we use their names to know which ones the user has
# installed on their system, and we use the corresponding ones
# we primed in '$SNAP/usr/share/hunspell' in our 'hunspell' part.
#
# - We don't set DICPATH=/var/lib/snapd/hostfs/usr/share/hunspell
#   to avoid potential incompatibility due to different hunspell
#   versions inside the snap and outside on the host.  See:
#   https://github.com/snapcore/snapd/pull/11025
#
# - We don't set DICPATH="$SNAP/usr/share/hunspell" because that
#   would result in all available dictionaries we primed in our
#   'hunspell' part being displayed in Thunderbird's interface,
#   presenting an overwhelming number of options to the user.
#   So instead we only use those that were installed on the host.
#   This way, the user could affect the dictionaries available to
#   Thunderbird snap similarly to how they could for non-snap Thunderbird.
for dic in $(find $host_hunspell/ -name "*.dic"); do
    dic_file=$(basename $dic)
    aff_file="${dic_file%%.dic}.aff"
    # Some dic,aff files in hunspell are themselves symlinks to other files,
    # e.g. /usr/share/hunspell/fr_CH.dic -> fr.dic.
    # That extra level of indirection somehow breaks spell checking.
    # We therefore use readlink to link to the "real" file, not to a symlink.
    if [ -e "$SNAP/usr/share/hunspell/${dic_file}" ]; then
        ln -s "$(readlink -e $SNAP/usr/share/hunspell/${dic_file})" $DICPATH/${dic_file}
    fi
    if [ -e "$SNAP/usr/share/hunspell/${aff_file}" ]; then
        ln -s "$(readlink -e $SNAP/usr/share/hunspell/${aff_file})" $DICPATH/${aff_file}
    fi
done

Youez - 2016 - github.com/yon3zu
LinuXploit