summarylogtreecommitdiffstats
path: root/electron-blur-me-not-patch.sh
blob: 1d2c267fad1a747f95d3eecd1d8311eaac4f4065 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

if [[ ! -e '{{launcher}}' ]]; then
  echo >&2 'Not modifying {{target}} because {{launcher}} is not installed.'
  exit 0
fi

if [[ ! -L '{{target}}' ]]; then
  echo >&2 'Moving {{target}} out of the way so we can create a symlink.'
  mkdir -pv "$(dirname '{{backup}}')"
  mv -fv '{{target}}' '{{backup}}'
fi

# Create or modify symlink so it points to the launcher script
exec ln -fnsv '{{launcher}}' '{{target}}'