Sha256: be4375afbc54b2dc180a23c33e49ec8af1f7c50785410e8dc1757671d64c500d
Contents?: true
Size: 753 Bytes
Versions: 2
Compression:
Stored size: 753 Bytes
Contents
# -*- coding: utf-8 -*- #!/usr/bin/env ruby require 'rubygems' unless defined?(Gem) require 'sinatra/base' require 'thread' class Object alias sh system end lib_dir = File.expand_path(File.join(File.dirname(__FILE__),'..','lib')) root_dir = File.expand_path(File.join(File.dirname(__FILE__),'..')) unless $LOAD_PATH.include?(lib_dir) $LOAD_PATH << lib_dir end if File.exist?('push.db') then system "rm push.db" end unless File.exist?("#{Dir.pwd}/spns.yml") then puts 'create config file: spns.yml' system "cp #{root_dir}/spns.yml #{Dir.pwd}/spns.yml" end unless File.exist?("#{Dir.pwd}/cron") then puts "create a demo 'cron' script under current directory" system "cp #{root_dir}/cron #{Dir.pwd}/cron" end require 'spns' App.run!
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
spns-0.2.4 | bin/spns |
spns-0.2.2 | bin/spns |