Commit 52b78449 authored by Paul Cammish's avatar Paul Cammish
Browse files

SHould fix dependency on sympl-common when building

parent 22051148
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 # Not sure this is the correct variable to use, but it appears to give the
......
...@@ -98,7 +98,6 @@ ...@@ -98,7 +98,6 @@
require 'getoptlong' require 'getoptlong'
require 'symbiosis/utils'
# #
# Entry point to the code # Entry point to the code
...@@ -184,16 +183,37 @@ end ...@@ -184,16 +183,37 @@ end
# #
# Show the manual, or the help # 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 exit 0
end end
# Moved until after help/manual to avoid build dependency.
require 'symbiosis/utils'
def verbose(s) def verbose(s)
puts s if $VERBOSELOCAL puts s if $VERBOSELOCAL
end end
......
...@@ -43,8 +43,6 @@ ...@@ -43,8 +43,6 @@
# Standard ruby # Standard ruby
# #
require 'getoptlong' require 'getoptlong'
require 'symbiosis/utils'
# #
...@@ -94,16 +92,36 @@ end ...@@ -94,16 +92,36 @@ end
# #
# Show the manual, or the help # 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 exit 0
end 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 # Sympl libraries -- required here so they're not needed during the build
......
...@@ -40,7 +40,6 @@ ...@@ -40,7 +40,6 @@
# Standard ruby # Standard ruby
# #
require 'getoptlong' require 'getoptlong'
require 'symbiosis/utils'
require 'fileutils' require 'fileutils'
...@@ -91,17 +90,36 @@ end ...@@ -91,17 +90,36 @@ end
# #
# Show the manual, or the help # 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 exit 0
end 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 # 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