Sha256: 59647fa87bc34c93f80fc3e0ed10d75f38876f9100b9293193450330a992987f

Contents?: true

Size: 805 Bytes

Versions: 181

Compression:

Stored size: 805 Bytes

Contents

#!/usr/bin/env ruby


def getOption(option)
  File.open('/etc/ejabberd/ssconfig.cfg', 'r') do |f1|  
    while line = f1.gets  
      line = line.gsub(/\n/,'')
      if line.match(/^#/)
        #Comments
      elsif line.match(/^#{option}/)
        return line.gsub(/#{option}/,'')
      end  
    end  
  end
  return "Undefined"
end




source_path = getOption("source_path=")

if source_path == "Undefined"
 #puts "mod_sspresence source_path in undefined: define source_path in /etc/ejabberd/ssconfig.cfg to compile mod_sspresence"
 puts "mod_sspresence source_path in undefined: Exit compile"
else
  puts "Compile mod_sspresence"
  system("erlc #{source_path}/mod_sspresence.erl")
  system 'sudo mv mod_sspresence.beam /lib/ejabberd/ebin/mod_sspresence.beam'
  puts "Compile mod_sspresence OK"
end



Version data entries

181 entries across 181 versions & 3 rubygems

Version Path
social_stream-0.11.3 presence/ejabberd/ejabberd_scripts/compile_module