bin/PastehubSync in pastehub-0.4.2 vs bin/PastehubSync in pastehub-0.5.0
- old
+ new
@@ -74,42 +74,9 @@
# save pid file
PasteHub.savePid( Process.pid )
# create clientSync
clientSync = PasteHub::ClientSync.new( hostname, 1.0 )
-
- # add notification handler
- receiveNotifyFunc =
- case RbConfig::CONFIG['host_os']
- when /^darwin/
- # MacOS X
- notifier_path = RbConfig::CONFIG['bindir'] + "/" + "terminal-notifier"
- if File.exist?( notifier_path )
- STDERR.puts( "Info: found terminal-notifier for MacOS X." )
- lambda { |x|
- str = if config.notifyMessageMax < x.size
- x[0...config.notifyMessageMax] + " ..."
- else
- x
- end
- url_option = ''
- util = PasteHub::Util.new
- if util.pulloutURL( str )
- url_option = '-open \'' + util.pulloutURL( str ) + '\''
- end
- command = sprintf( "%s -title 'PasteHub' -message '\\%s' %s", notifier_path, str, url_option )
- system( command )
- }
- else
- nil
- end
- else
- lambda { |x|
- # nothing to do.
- }
- end
-
- clientSync.addNoitfyCallback( receiveNotifyFunc )
while true
signals = 0
case RbConfig::CONFIG['host_os']