summarylogtreecommitdiffstats
path: root/firefox-developer-edition-firefox-symlinks-delete.bash
blob: 0831344d5d276830c6368cd477a51d482b3c165f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

if [[ ! -d /usr/lib/firefox-developer-edition ]]; then
  exit 0
fi

# Remove all existing symlinks that point to /usr/lib/firefox
exec find /usr/lib/firefox-developer-edition -type l \
  -exec bash -c '
    set -eu
    target="$(readlink -m "$1")"
    if [[ "${target}" == /usr/lib/firefox/* ]]; then
      rm -v "$1"
    fi
    ' _ '{}' ';'