Commit ca1ac43a authored by Paul Cammish's avatar Paul Cammish
Browse files

Merge branch 'issue224_fix' into 'master'

Should fix dependency on sympl-common when building

See merge request sympl/sympl!23
parents 22051148 52b78449
RUBYLIB := "${PWD}/lib:${PWD}/../common/lib"
RUBYLIB := "./lib:../common/lib"
#
# Not sure this is the correct variable to use, but it appears to give the
......
......@@ -98,7 +98,6 @@
require 'getoptlong'
require 'symbiosis/utils'
#
# Entry point to the code
......@@ -184,16 +183,37 @@ end
#
# Show the manual, or the help
#
Symbiosis::Utils.show_usage( __FILE__ ) if help
Symbiosis::Utils.show_manual( __FILE__ ) if manual
#
# If either happened we can exit.
# CAUTION! Here be quality kode.
#
if ( help or manual )
if manual or help
# Open the file, stripping the shebang line
lines = File.open(__FILE__){|fh| fh.readlines}[1..-1]
found_synopsis = false
lines.each do |line|
line.chomp!
break if line.empty?
if help and !found_synopsis
found_synopsis = (line =~ /^#\s+SYNOPSIS\s*$/)
next
end
puts line[2..-1].to_s
break if help and found_synopsis and line =~ /^#\s*$/
end
exit 0
end
# Moved until after help/manual to avoid build dependency.
require 'symbiosis/utils'
def verbose(s)
puts s if $VERBOSELOCAL
end
......
......@@ -43,8 +43,6 @@
# Standard ruby
#
require 'getoptlong'
require 'symbiosis/utils'
#
......@@ -94,16 +92,36 @@ end
#
# Show the manual, or the help
#
Symbiosis::Utils.show_usage( __FILE__ ) if help
Symbiosis::Utils.show_manual( __FILE__ ) if manual
#
# If either happened we can exit.
# CAUTION! Here be quality kode.
#
if ( help or manual )
if manual or help
# Open the file, stripping the shebang line
lines = File.open(__FILE__){|fh| fh.readlines}[1..-1]
found_synopsis = false
lines.each do |line|
line.chomp!
break if line.empty?
if help and !found_synopsis
found_synopsis = (line =~ /^#\s+SYNOPSIS\s*$/)
next
end
puts line[2..-1].to_s
break if help and found_synopsis and line =~ /^#\s*$/
end
exit 0
end
# Moved until after help/manual to avoid build dependency.
require 'symbiosis/utils'
#
# Sympl libraries -- required here so they're not needed during the build
......
......@@ -40,7 +40,6 @@
# Standard ruby
#
require 'getoptlong'
require 'symbiosis/utils'
require 'fileutils'
......@@ -91,17 +90,36 @@ end
#
# Show the manual, or the help
#
Symbiosis::Utils.show_usage( __FILE__ ) if help
Symbiosis::Utils.show_manual( __FILE__ ) if manual
#
# If either happened we can exit.
# CAUTION! Here be quality kode.
#
if ( help or manual )
if manual or help
# Open the file, stripping the shebang line
lines = File.open(__FILE__){|fh| fh.readlines}[1..-1]
found_synopsis = false
lines.each do |line|
line.chomp!
break if line.empty?
if help and !found_synopsis
found_synopsis = (line =~ /^#\s+SYNOPSIS\s*$/)
next
end
puts line[2..-1].to_s
break if help and found_synopsis and line =~ /^#\s*$/
end
exit 0
end
# Moved until after help/manual to avoid build dependency.
require 'symbiosis/utils'
#
# Symbiosis libraries -- required here so they're not needed during the build
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment