summarylogtreecommitdiffstats
path: root/sendanywhere.install
blob: 7c2613083c71461cb0b2b7cce96ab2c6b4e250a7 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
post_install()
{
    echo '==> Installing icons.'
    for icon in "/opt/estmob/sendanywhere/sendanywhere_icon_"*.png; do
        size="${icon##*_}"
        size="${size%.png}"

        xdg-icon-resource install --size "$size" "$icon" "estmob-sendanywhere"
    done

    update-mime-database /usr/share/mime &> /dev/null 2> /dev/null
    update-desktop-database > /dev/null 2>&1 
}

post_upgrade()
{
    post_install
}


pre_remove()
{
    echo '==> Uninstalling icons.'
    for icon in "/opt/estmob/sendanywhere/sendanywhere_icon_"*.png; do
        size="${icon##*_}"
        size="${size%.png}"

        xdg-icon-resource uninstall --size "$size" "$icon" "estmob-sendanywhere"
    done

    update-mime-database /usr/share/mime &> /dev/null
    update-desktop-database > /dev/null 2>&1 
}

post_remove()
{
    rm -rf "$HOME/.local/share/Estmob"
    rm -rf "$HOME/.config/autostart/sendanywhere.desktop"
}