title: mac osx 10.7 install script error: "~/Library/" not found
body: <p>I use a bash script to install an app on Mac OS X "Lion". First I copy the app bundle into place, then attempt to install postgres into the app bundle. The data path for the postgres db needs to be in "~/Library/Application Support/myappfolder/data/". </p>
  
  <p>Now the problem (appears to be) that the script stumbles because the OS says the path is not found. Backing up the path names I get to "~/Library/" and it still fails. The script is run with admin privileges.</p>
  
  <p>To put this another way, from the terminal, this works:</p>
  
  <pre><code>   me: cd ~/Library
  </code></pre>
  
  <p>but this does not:</p>
  
  <pre><code>   me: mydir="~/Library/"
     me: cd $mydir
  </code></pre>
  
  <p>I know things have changed in 10.7, but I haven't found the answer at the dev center yet. </p>