Skip to content

Commit

Permalink
Merge branch 'production'
Browse files Browse the repository at this point in the history
  • Loading branch information
tashian committed Apr 21, 2011
2 parents 4ac2ae0 + 023517a commit 3c17ba5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/recipes/database.rb
Expand Up @@ -64,7 +64,7 @@
development_info = YAML.load_file("config/database.yml")['development']

input_file_gz = ENV.has_key?('SQLGZ') ? ENV['SQLGZ'] : "/tmp/#{application}.sql.gz"
input_file_sql = File.basename(input_file_gz, '.gz')
input_file_sql = File.join(File.dirname(input_file_gz), File.basename(input_file_gz, '.gz'))

run_str = "gunzip #{input_file_gz} && PGHOST=#{development_info['host']} PGPORT=#{development_info['port']} PGUSER=#{development_info['username']} PGPASSWORD=#{development_info['password']} script/postgis_restore.pl #{postgis_dir}/postgis.sql #{development_info['database']} #{input_file_sql}"

Expand All @@ -83,4 +83,4 @@
run "rm -f #{backup_file}.gz"
end
end
0
0

0 comments on commit 3c17ba5

Please sign in to comment.