Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
=begin
License: latest LGPL :D
As per my discussion with Gianni (@gf3),
http://twitter.com/phillmv/status/2659984348
http://twitter.com/phillmv/status/2660026344
http://twitter.com/phillmv/status/2660059102
http://twitter.com/phillmv/status/2660184885
http://twitter.com/phillmv/status/2660283856 and
http://twitter.com/phillmv/status/2660306850
VERSION ALPHA 0.01
requires sshfs and macfuse preinstalled and visible from your PATH
Will only work on servers where you've set up SSH keys, but you've done
that already right ;)?
TODO:
accept tab key to switch between fields (Shoes magic? I feel lame about this part)
accept PASSWORDS
save servers
Ironically getting this to work might be out of the purview of some
*technical* peeps just the same.
This took me 15 minutes to write from start to finish, as I had to look
up the relevant Shoes methods, and forty five minutes to debug
Shoes ships with an older version of libglib-2.0.0.dylib than what
sshfs requires. You'll have to replace the libglib-2.0.0.dylib included
in the Shoes.app/Contents/MacOS folder with the libglib-2.0.0.dylib that
your copy of sshfs will try to load (on my computer it's /sw/lib/libglib-2.0.0.dylib)
If I were distributing this however it would be a non issue, so I feel
vindicated all the same.
*****
No harm meant to the expandrive peeps - I think it's probably a useful and well thought
out piece of software, but I suppose my argument at large is that it's a somewhat
trivial improvement (with the exception of their S3 adapter). For all I know
they HAVE gone ahead and submitted patches and been good citizens, but nonetheless
I'm not convinced that this is a particularly useful appropriation.
Ever since I made the plunge to OSX I've been kind of shocked at the lack of free, quality
utilities that are so pervasive in the Linux world. Little things like a good FTP client or
being able to mount ISO's with a mouse click or look inside archives.
This is a totally legit use of the underlying libraries and I commend them for putting in the
time to make a product people would actually want to use, but I don't know! It's complicated.
These kinds of utilities are all just basic little things that I should not have to think about
anymore.
=end
Shoes.app :height => 500, :width => 300 do
background "rgb(240, 245, 220)"
stack :margin => 10 do
para "user:"
@user = edit_line
para "server:"
@server = edit_line
para "remote folder:"
@remote_folder = edit_line
para "local folder:"
@local_folder = edit_line
end
# This is rocket science. ZOMG!
button "Mount that sexy beast" do
Shoes.p (line = "sshfs #{@user.text}@#{@server.text}:#{@remote_folder.text} #{@local_folder.text}")
Shoes.p `#{line}`
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment