8 lines
246 B
Bash
8 lines
246 B
Bash
_launchd_script_path() {
|
|
local script_path="${SCRIPT_PATH:-}"
|
|
if [ -z "$script_path" ]; then
|
|
script_path="$(cd "$(dirname "$0")" && pwd)/$(basename "$0")"
|
|
fi
|
|
printf '%s' "$script_path" | sed 's/&/\&/g; s/</\</g; s/>/\>/g'
|
|
}
|