makeWrapper: search for free unwrapped file name
This commit is contained in:
parent
8c56608078
commit
e7c76d3c25
@ -132,6 +132,9 @@ wrapProgram() {
|
||||
local prog="$1"
|
||||
local hidden
|
||||
hidden="$(dirname "$prog")/.$(basename "$prog")"-wrapped
|
||||
while [ -e "$hidden" ]; do
|
||||
hidden="${hidden}_"
|
||||
done
|
||||
mv "$prog" "$hidden"
|
||||
# Silence warning about unexpanded $0:
|
||||
# shellcheck disable=SC2016
|
||||
|
Loading…
Reference in New Issue
Block a user