aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorAlex Legler <alex@a3li.li>2015-12-30 18:56:17 +0100
committerAlex Legler <alex@a3li.li>2015-12-30 18:56:17 +0100
commit4e081ac5d6024b80cb85f73eaf018029d1a47119 (patch)
treeca3858bc67ce3648d08adc01a1d14f4a991f6b98 /bin
parentAdd functionality to add CVEs to CVETool (diff)
downloadglsamaker-4e081ac5d6024b80cb85f73eaf018029d1a47119.tar.gz
glsamaker-4e081ac5d6024b80cb85f73eaf018029d1a47119.tar.bz2
glsamaker-4e081ac5d6024b80cb85f73eaf018029d1a47119.zip
Update to rails-4.2; first bits of code cleanup
Diffstat (limited to 'bin')
-rwxr-xr-xbin/rails2
-rwxr-xr-xbin/setup29
2 files changed, 30 insertions, 1 deletions
diff --git a/bin/rails b/bin/rails
index 728cd85..5191e69 100755
--- a/bin/rails
+++ b/bin/rails
@@ -1,4 +1,4 @@
#!/usr/bin/env ruby
-APP_PATH = File.expand_path('../../config/application', __FILE__)
+APP_PATH = File.expand_path('../../config/application', __FILE__)
require_relative '../config/boot'
require 'rails/commands'
diff --git a/bin/setup b/bin/setup
new file mode 100755
index 0000000..acdb2c1
--- /dev/null
+++ b/bin/setup
@@ -0,0 +1,29 @@
+#!/usr/bin/env ruby
+require 'pathname'
+
+# path to your application root.
+APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
+
+Dir.chdir APP_ROOT do
+ # This script is a starting point to setup your application.
+ # Add necessary setup steps to this file:
+
+ puts "== Installing dependencies =="
+ system "gem install bundler --conservative"
+ system "bundle check || bundle install"
+
+ # puts "\n== Copying sample files =="
+ # unless File.exist?("config/database.yml")
+ # system "cp config/database.yml.sample config/database.yml"
+ # end
+
+ puts "\n== Preparing database =="
+ system "bin/rake db:setup"
+
+ puts "\n== Removing old logs and tempfiles =="
+ system "rm -f log/*"
+ system "rm -rf tmp/cache"
+
+ puts "\n== Restarting application server =="
+ system "touch tmp/restart.txt"
+end