summarylogtreecommitdiffstats
path: root/electron-blur-me-not-patch.sh
diff options
context:
space:
mode:
authorClaudia Pellegrino2023-07-09 12:11:24 +0200
committerClaudia Pellegrino2023-07-09 12:17:39 +0200
commit70859e8a72ca19da4c6e8bd4b8848d0f6a92faf1 (patch)
treeff9b5dbccac4a801bf06b673429ec402e1315882 /electron-blur-me-not-patch.sh
parentdb211dccf7e51ec12e68bae7aab7b573e5446d0b (diff)
downloadaur-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.sh7
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}}'