pantheon-systems/terminus — pull request #34 by mikemilano (2013-09-16 03:37:07+00:00)
Title: sshfs support: psite-mount

This adds sshfs support to mount the appserver file system by site name and environment. Tests have been done on Mac OSX with http://osxfuse.github.io/

It takes 3 arguments: site, environment, destination.

The destination is the path you would like to mount the remote file system to.

If the destination directory does not exist locally, sshfs cannot mount. Drush will prompt for it to be created if it does not exist.

By the time it gets to the part where it actually runs the sshfs command, it will most likely complete. The potential errors are if the destination already has something mounted to it, or the sshfs command doesn't exist. In this case, a drush error will report the problem.

Command with all params and existing target directory:
```
$ drush psite-mount mysite dev ./some_dir
```

With prompts and no existing target directory
```
$ drush psite-mount
Select a site.
[0] : Cancel
[1] : mysite enterprise 14a61510-1e81-11e3-8224-0800200c9a66
1

Select an environment.
[0] : Cancel
[1] : dev
[2] : live
[3] : test

1
Select a mount destination: [./dev]:
The directory ./dev does not exist.
Would you like to create it? (y/n): y
Mount successful. To unmount, run: umount ./dev [ok]

$ ls dev/
cache	drushrc.php	htpasswd	mime.types	php53.ini
certs	files	includes	nginx.conf	run
chef.stamp	fusedav.conf	logs	php-fpm.conf	tmp
code	fusedav_version	metadata.json	php.ini
```