summarylogtreecommitdiffstats
path: root/fcitx-baidupinyin.install
blob: f875dde19c86b694ac31985b26db1fc491098792 (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
post_install() {
    for dir in /home/*
    do
        if test -d $dir
        then
            if [ ! -d "$dir/.config/BaiduPY.user" ]; then
                mkdir $dir/.config/BaiduPY.user
            fi
            if [ -d "$dir/.config/BaiduPY.user/data" ]; then
                rm -rf $dir/.config/BaiduPY.user/data
            fi
            ln -s  /opt/fcitx-baidupinyin/data $dir/.config/BaiduPY.user/
        fi
    done
}

post_upgrade() {
    post_install
}

post_remove() {
    for dir in /home/*
    do
        if test -d $dir
        then
            if [ -d "$dir/.config/BaiduPY.user/" ]; then
                rm -rf $dir/.config/BaiduPY.user/data
            fi
        fi
    done
}