forked from dradis/meta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreset.sh
executable file
·41 lines (33 loc) · 989 Bytes
/
reset.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
#
# Dradis Framework environment reset script
#
# License:
# This file may be used under the terms of the GNU General Public
# License version 2.0 as published by the Free Software Foundation
# and appearing in the file LICENSE.txt included in the packaging of
# this file.
#
# This loads RVM if available which is needed to process the ./server/.rvmrc
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
export RAILS_ENV=production
cd server
bundle check
if [ $? -eq 1 ]
then
echo -n "Some Ruby gems are missing, do you want to install them now? [y] "
read INSTALL
if [ "x$INSTALL" = "xy" ]
then
echo
echo -e "Ok then, I am going to run \033[1mbundle install\033[0m for you, then you should run this script again."
echo
bundle install
else
echo
echo -e 'You can install the gems manually by going to the ./server/ folder and running: \033[1mbundle install\033[0m'
echo
fi
else
bundle exec thor dradis:reset
fi