Get the current directory when the PKG program runs

My program is packaged with the package program. I want to get the current directory of the current PKG package file when PKG installs.

For preInstall in pkg, output the following path: pkgpath = $PACKAGE_PATH

Have resolved.

Get the current directory when the PKG program runs
 
 
Q