Re: pwd in preinstall and dummy component package folder permissions.
Re: pwd in preinstall and dummy component package folder permissions.
- Subject: Re: pwd in preinstall and dummy component package folder permissions.
- From: Sachin Porwal <email@hidden>
- Date: Mon, 12 Apr 2010 14:12:22 +0530
Sorry forgot to mention that i am using Shell scripting for creating the preinstall script
Sachin.
On Mon, Apr 12, 2010 at 1:55 PM, Christian Unger
<email@hidden> wrote:
Just for the records:
instead of forking pwd, you might want to have a look at perl's getcwd() implementation:
http://perldoc.perl.org/5.8.8/Cwd.html
On 12.04.2010, at 10:01, Sachin Porwal wrote:
Hi Bill,
I tried to use `pwd` in preinstall script which is contained in 10.4 pkg but it did not work as expected. I am always getting the root folder ('/') as the return value in preinstall script. It seems like `pwd` will not work correctly with 10.4 pkg & we need to use '$0/../' only.
Can you please confirm this??
Thanks,
Sachin
On Sat, Apr 10, 2010 at 2:03 AM, Bill Coderre
<email@hidden> wrote:
On Apr 9, 2010, at 12:47 PM, Sravana Kumar wrote:
Hi All,
1. In my dummy component package, I am launching an executable present next my preinstall, what is the recommended/suggested way of accessing present working directory in preinstall scripts ?
`pwd` or
"$PWD" or
"." or
"$0/../"
I saw safari pkg and foun that it is using `pwd`. I hoping that this will work in all platforms and in all forms of package and will not break in future ?
my $currentDirectory = `pwd`; is a perl statement that calls the shell, executes the unix command pwd, and stuffs the output into the variable $currentDirectory. This can let you find other files "near" the currently-executing one, for whatever reason you have.
Two examples:
1) You have more than one postflight script, or
2) You have a file containing data that the current executing script needs to access.
It is unlikely to break in the future, but note that the organization of packages is different between "flat" packages and "bundle" packages.
And I also commiserate that one used to be able to use $0, and now one must use pwd.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden