eddie11c Posted March 26, 2008 Share Posted March 26, 2008 I am trying to add a script into an installer to make an alias. Can I not use the ln command in bash? if so is the usage different somehow? ln -s <target> <alias> is what i have tried, I get no error during the script, but also don't see any alias output. I can do the command just fine in terminal and I do require root authorization. Any ideas? I want to create an alias as opposed to installing a premade one.. Link to comment Share on other sites More sharing options...
ritalin Posted March 26, 2008 Share Posted March 26, 2008 ln -s ${1} ${2} works in #!/bin/bash or #!/bin/sh on my machine. In what context are you trying to use it? Link to comment Share on other sites More sharing options...
eddie11c Posted March 26, 2008 Author Share Posted March 26, 2008 During my custom install DVD I want to create some alias'. I tried ln -s "$3/target" "$3/alias", and even tried pointing to the ln command /bin/ln, it doesn't spit out any errors about not finding the file or that it already exists, but yet there is no output that I can see. Maybe my syntax is incorrect. If you could post an example of what is working? Lets make up a file called test that is located in /System/Library/Filesystems/Example of the target Volume $3 and want an alias created in the same volume in /usr/bin. ln -s "$3/System/Library/Filesystems/Example/test" "$3/usr/bin/test" but this is not working. Any help would be appreciated. Link to comment Share on other sites More sharing options...
ritalin Posted March 26, 2008 Share Posted March 26, 2008 Where in the installer will this command being called from? InstallationCheck VolumeCheck preflight postflight...Etc Is volume referenced by $3 definitely mounted at the point in time in question? When I said it was working in bash and sh, that was just a quick test from a shell script on my desktop, not from a running Installer. I will try again from my live/install memory stick. Link to comment Share on other sites More sharing options...
eddie11c Posted March 26, 2008 Author Share Posted March 26, 2008 Yes the target volume is mounted and defined as $3 during install. This script would be attached as postinstall of a package. Link to comment Share on other sites More sharing options...
ritalin Posted March 26, 2008 Share Posted March 26, 2008 Okay, I'll build a pkg and try it. Back in a mo..... Yes, it works fine. Link to comment Share on other sites More sharing options...
eddie11c Posted March 26, 2008 Author Share Posted March 26, 2008 Okay, I'll build a pkg and try it. Back in a mo..... Yes, it works fine. And the syntax I had was correct? If so I will have to double check it again for a typo or something. Link to comment Share on other sites More sharing options...
ritalin Posted March 26, 2008 Share Posted March 26, 2008 Here is a link to the pkg I used to run the test. Link to comment Share on other sites More sharing options...
siddddddo Posted April 5, 2010 Share Posted April 5, 2010 I want to study x-script.. Link to comment Share on other sites More sharing options...
Recommended Posts