Skip to content

Bash Personal Initialization File

kokoabim edited this page Nov 22, 2012 · 2 revisions

During installation, the user's Bash personal initialization file ("Bash profile file") is modified.

Where Bash profile file exists

The installer looks for ~/.bash_profile, ~/.bash_login and ~/.profile, in that order, and uses the first one that exists (as does Bash too). If neither is found, ~/.bash_profile is created and used.

What is added during installation

A couple environment variables are exported and the PATH is prepended-to with the following statements so that subsequent Bash sessions (i.e. Terminal windows) have access to them.

  • export iOSOpenDevPath=/opt/iOSOpenDev
  • export iOSOpenDevDevice=
  • export PATH=/opt/iOSOpenDev:$PATH

What needs to be added manually

The iOSOpenDevDevice environment variable, as shown above, has an empty value. The user, after installation, must add the host name (e.g. MyiPhone.local) or IP address 192.168.1.101 of the device to be used during development as the value of this environment variable.

Examples:

  • export iOSOpenDevDevice=192.168.1.101
  • export iOSOpenDevDevice=MyiPhone.local

Tip

If iOSOpenDevDevice is properly exported in the Bash profile file then...

  • iosod actions that need a host address of a device (by the -h option) can use the exported value instead so the -h option is not needed.
  • The iOSOpenDevDevice build setting in Xcode projects created from iOSOpenDev provided templates can be left blank and during the Run Script Build Phase, iosod will scan the Bash profile file to acquire the value.