summarylogtreecommitdiffstats
path: root/vscode-xdg-patch-hook.install
blob: 69fd857bc8f8d70bb1d22dd6ea495987825f708d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
_updatable_files() {
  ls \
    /usr/lib/code*/package.json \
    /opt/visual-studio-code*/resources/app/package.json \
    /opt/vscodium*/resources/app/package.json \
    /usr/share/applications/code*.desktop \
    /usr/share/applications/vscode*.desktop \
    /usr/share/applications/vscodium*.desktop \
      2>/dev/null \
    | grep -v -E '\-url-handler.desktop$'
}

post_install() {
  _updatable_files | /usr/lib/vscode-xdg-patch-hook/apply-xdg-patch.sh
}

post_upgrade() {
  post_install
}