Skip to content

Commit 9f38d5d

Browse files
committed
install.sh: improve POSIX compatibility
POSIX `find` do not support `-lname`: https://pubs.opengroup.org/onlinepubs/9799919799/utilities/find.html
1 parent 50b9f0e commit 9f38d5d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

uninstall.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,9 @@ do
385385
done
386386
if [[ "${#paths[@]}" -gt 0 ]]
387387
then
388-
args=("${paths[@]}" -type l -lname '*/Cellar/*')
388+
# We want expand in subcommand, not here
389+
# shellcheck disable=SC2016
390+
args=("${paths[@]}" -type l -exec /bin/sh -c 'case $(ls -l "{}") in *-\>\ */Cellar/*)exit;esac;exit 1')
389391
if [[ -n "${opt_dry_run}" ]]
390392
then
391393
args+=(-print)

0 commit comments

Comments
 (0)