droplr.rb 246 Bytes
Newer Older
Fabio Fernandes's avatar
Fabio Fernandes committed
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env ruby

if ARGV[0].nil?
   puts "You need to specify a parameter."
   exit!(1)
end

if ARGV[0][%r{^http[|s]://}i]
	`osascript -e 'tell app "Droplr" to shorten "#{ARGV[0]}"'`
else
	`open -ga /Applications/Droplr.app "#{ARGV[0]}"`
Marc Cornellà's avatar
Marc Cornellà committed
12
end