I am not even sure if is possible, but I would like to install a package from a volume that is mounted on my osx via symlink.
The name changes every day, since it carry the timestamp on the title, so each day the volume will have a different name (and that's why I have a symlink to mount the newest one every day).
IS possible to run installer without specify the name of the volume? It is mounted but when i try to access it using *testdisk (testdisk is the name of the volume th开发者_如何学Goat never change, the date is appended at the end right after it) I get an error from Installer because it cannot find the path.
Would be great if i can use in the path the wildcard, so no matter what the volume name is, if it gets part of the name of the volume it will point to that volume.
If this is not possible I will just look for the mounted volume and get the name from there, and pass it as parameter to the installer; but I would like to avoid it if installer is able to do this.
this will give you your drive name
ls -l /Volumes/*testdisk | awk '{print "/Volumes/"$11}'
You can use pwd -P
(at least in bash and zsh) to print the path to a directory given a symlink.
So, something like this should work: installer -pkg ... -target "$(cd /path/to/target/symlink ; pwd -P)"
精彩评论