summarylogtreecommitdiffstats
path: root/touchdesigner-linux.install
blob: d5c81e6b09c1a86830a1d912c041f0d005243ed4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
post_install() {
    # Register MIME types and default file handler
    if command -v xdg-mime &>/dev/null; then
        xdg-mime default touchdesigner-file.desktop \
            application/x-touchdesigner-toe 2>/dev/null || true
        xdg-mime default touchdesigner-file.desktop \
            application/x-touchdesigner-tox 2>/dev/null || true
    fi
}

post_upgrade() {
    post_install
}

post_remove() {
    # Clean up mimeapps.list entries
    local mimeapps="${HOME}/.config/mimeapps.list"
    if [ -f "$mimeapps" ]; then
        sed -i '/touchdesigner/d' "$mimeapps" 2>/dev/null || true
    fi
}