summaryrefslogtreecommitdiff
path: root/bin/devel
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2014-06-30 10:57:54 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2014-06-30 10:57:54 -0400
commit8f8345dd63c60ec0684176f00e07d66e160cf857 (patch)
tree5012aecc981782ada238d55ea7e7d531799c119b /bin/devel
parent0453b075c73817f7c05de14894ec78f3d6356c81 (diff)
Clean up executables
Diffstat (limited to 'bin/devel')
-rwxr-xr-xbin/devel/db-drop8
-rwxr-xr-xbin/devel/start6
-rwxr-xr-xbin/devel/stop6
3 files changed, 20 insertions, 0 deletions
diff --git a/bin/devel/db-drop b/bin/devel/db-drop
new file mode 100755
index 0000000..40c2b4c
--- /dev/null
+++ b/bin/devel/db-drop
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+bindir="$(dirname "$(dirname "$(readlink -f "$0")")")"
+PATH=$bindir:$PATH
+
+set -e
+rake db:drop
+rake db:migrate
+rake db:seed
diff --git a/bin/devel/start b/bin/devel/start
new file mode 100755
index 0000000..2cb44e7
--- /dev/null
+++ b/bin/devel/start
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+bindir="$(dirname "$(dirname "$(readlink -f "$0")")")"
+PATH=$bindir:$PATH
+
+rails server --daemon "$@"
+delayed_job start
diff --git a/bin/devel/stop b/bin/devel/stop
new file mode 100755
index 0000000..e2f7858
--- /dev/null
+++ b/bin/devel/stop
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+srcdir="$(dirname "$(dirname "$(dirname "$(readlink -f "$0")")")")"
+PATH=${srcdir}/bin:$PATH
+
+kill $(<"${srcdir}/tmp/pids/server.pid")
+delayed_job stop