blob: 2e5e6198e42f6c01a92503ec70d920507fb53a2d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#!/bin/bash
if [[ ! -e '{{executable}}' ]]; then
echo >&2 'Not modifying {{target}} because {{executable}} is not installed.'
exit 0
fi
if [[ ! -L '{{target}}' ]]; then
echo >&2 'Not modifying {{target}} because it is not a symlink.'
exit 0
fi
# Modify symlink so it points to the original executable
echo >&2 'Restoring original {{target}}'
exec ln -fnsv '{{executable}}' '{{target}}'
|