summarylogtreecommitdiffstats
path: root/hook.sh
blob: 6fdc6d7355e6da57f2dc4616d1255de41f291d78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash

packages=("firefox"
          "thunderbird")

for package in "${packages[@]}"; do
    target="/usr/lib/$package/dictionaries"

    # Check if package exists
    if [[ -e "$target" ]]; then
        case "$1" in
            "install")
                ln -snf /etc/mozilla-custom-dictionaries "$target"
                ;;
            "remove")
                ln -snf /usr/share/hunspell "$target"
                ;;
            *)
                exit 1
                ;;
        esac
    fi
done

exit 0