Sha256: 41e21ab9c1004ea067509c93903a5796cf99d4a0b2f94afc5f0bf1b3528810b0

Contents?: true

Size: 1.08 KB

Versions: 1

Compression:

Stored size: 1.08 KB

Contents

#!/usr/bin/env ruby
# $Date: 2009/02/20 18:46:54 $
##########################################################
require 'lib/global_options_variables'
GlobalOptionsVariables.set('0.0.3',
        <<EOT
Usage: #{$0.sub(/^.*\//,'')} [options]

Options:
        -h, --help      print this help text and exit
        -v, --version   print program version and exit
        -t, --test      test
        -T, --trace     trace
EOT
        )
require 'lib/setup_user_space'
UserSpace.setup
UserSpace.mkdir('/gifs')
UserSpace.copy('/gifs/logo.gif')
require USER_CONF_DIR+CONF_FILE
##########################################################
require 'lib/gtk2passwordapp'

lock = USER_CONF_DIR+'/lock'
if File.exist?(lock) then
  $stderr.puts "process already running?"
  # user should then notice it's already running, but
  # let's remove the lock in case it's not and user
  # tries again....
  File.unlink(lock)
else
  begin
    File.open(lock,'w'){|fh| fh.puts $$ }
    gpa = Gtk2PasswordApp.new
    gpa.status_icon
  rescue Exception
    puts_bang!
  ensure
    File.unlink(lock) if File.exist?(lock)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gtk2passwordapp-0.0.3 bin/gtk2passwordapp