diff options
author | Claudia Pellegrino | 2023-07-09 12:11:24 +0200 |
---|---|---|
committer | Claudia Pellegrino | 2023-07-09 12:17:39 +0200 |
commit | 70859e8a72ca19da4c6e8bd4b8848d0f6a92faf1 (patch) | |
tree | ff9b5dbccac4a801bf06b673429ec402e1315882 /electron-blur-me-not-patch.sh | |
parent | db211dccf7e51ec12e68bae7aab7b573e5446d0b (diff) | |
download | aur-70859e8a72ca19da4c6e8bd4b8848d0f6a92faf1.tar.gz |
Add support for executables which are not symlinks
Diffstat (limited to 'electron-blur-me-not-patch.sh')
-rw-r--r-- | electron-blur-me-not-patch.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/electron-blur-me-not-patch.sh b/electron-blur-me-not-patch.sh index 43428546a2b6..1d2c267fad1a 100644 --- a/electron-blur-me-not-patch.sh +++ b/electron-blur-me-not-patch.sh @@ -6,9 +6,10 @@ if [[ ! -e '{{launcher}}' ]]; then fi if [[ ! -L '{{target}}' ]]; then - echo >&2 'Not modifying {{target}} because it is not a symlink.' - exit 0 + echo >&2 'Moving {{target}} out of the way so we can create a symlink.' + mkdir -pv "$(dirname '{{backup}}')" + mv -fv '{{target}}' '{{backup}}' fi -# Modify symlink so it points to the launcher script +# Create or modify symlink so it points to the launcher script exec ln -fnsv '{{launcher}}' '{{target}}' |