mirror of
https://github.com/wavetermdev/homebrew-cask.git
synced 2026-08-05 13:43:24 -07:00
accept symlinks as arguments
This commit is contained in:
@@ -118,6 +118,9 @@ See CONTRIBUTING.md and 'man pkgutil' for more information.
|
||||
die "ERROR: Unknown argument '$arg'"
|
||||
fi
|
||||
done
|
||||
if [[ -h "$opt_pkg" ]]; then
|
||||
opt_pkg="$(/usr/bin/readlink "$opt_pkg")"
|
||||
fi
|
||||
if ! [[ -e "$opt_pkg" ]]; then
|
||||
die "ERROR: No such pkg file: '$opt_pkg'"
|
||||
fi
|
||||
|
||||
@@ -48,6 +48,9 @@ mark_up_sources () {
|
||||
_list_id_in_kext () {
|
||||
|
||||
kextdir="$1"
|
||||
if [[ -h "$kextdir" ]]; then
|
||||
kextdir="$(/usr/bin/readlink "$kextdir")"
|
||||
fi
|
||||
|
||||
{
|
||||
# emit strings that look like bundle ids
|
||||
|
||||
@@ -114,6 +114,9 @@ mark_up_sources () {
|
||||
_list_ids_in_app () {
|
||||
|
||||
appdir="$1"
|
||||
if [[ -h "$appdir" ]]; then
|
||||
appdir="$(/usr/bin/readlink "$appdir")"
|
||||
fi
|
||||
|
||||
{
|
||||
# emit strings that look like bundle ids
|
||||
|
||||
@@ -56,6 +56,9 @@ _list_ids_in_pkg () {
|
||||
|
||||
if [[ -d "$1" ]]; then
|
||||
pkgdir="$1"
|
||||
if [[ -h "$pkgdir" ]]; then
|
||||
pkgdir="$(/usr/bin/readlink "$pkgdir")"
|
||||
fi
|
||||
else
|
||||
local tmpdir=`/usr/bin/mktemp -d -t list_ids_in_pkg`
|
||||
trap "/bin/rm -rf -- '$tmpdir'" EXIT
|
||||
|
||||
Reference in New Issue
Block a user