File: surserver

package info (click to toggle)
subtle 0.11.3224-xi-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,600 kB
  • sloc: ansic: 14,699; ruby: 3,101; makefile: 17
file content (40 lines) | stat: -rw-r--r-- 901 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/ruby
# -*- encoding: utf-8 -*-
#
# @package sur - surserver
#
# @file SUR - Subtle User Repository
# @author Christoph Kappel <unexist@subforge.org>
# @version $Id: sur.rb,v 7 2009/09/07 21:25:11 unexist $
#
# This program can be distributed under the terms of the GNU GPLv2.
# See the file COPYING for details.
#

begin
  require "subtle/sur/version"
  require "subtle/sur/server"

  Subtle::Sur::Server.new.run
rescue LoadError => error
  missing = error.to_s.split(" ").last

  # Check missing files
  if "archive/tar/minitar" == missing
    missing = "archive-tar-minitar"
  end

  puts <<EOF
>>> ERROR: Cannot find the gem #{missing}
>>>        Please install it with following command:
>>>        gem install #{missing}
EOF
rescue => error
  puts ">>> ERROR: #{error}"

  unless error.is_a?(RuntimeError)
    puts error.backtrace
  end
end

# vim:ts=2:bs=2:sw=2:et:fdm=marker:ft=ruby