-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautobot.sh
executable file
·60 lines (53 loc) · 1.55 KB
/
autobot.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
while test $# -gt 0; do
case "$1" in
--init)
# before we can install things we need to check if there are the following things available
# 1. ruby
if ! hash ruby 2> /dev/null; then
echo "ruby is not installed, please install ruby and run this script again"
break
fi
# 2. sass
if ! hash sass 2> /dev/null; then
echo "Sass is not installed, adding gem"
gem install sass
echo "Installed Sass"
fi
echo "install the npm stuff, this will create a node_modules folder"
echo "let's check if there is a package.json"
if [ -f 'package.json' ]; then
echo "found the package.json, let's see if there is anything installed"
if [ -d 'node_modules' ]; then
echo "node_modules folder exists, running update"
npm update
else
echo "nothing found, installing..."
npm install --loglevel info
fi
else
echo "couldn't find package.json, please add your package.json file."
fi
# done with the npm part! Now onto sass
# make sass directory
# set source directory?
echo "creating sass directory"
mkdir "sass"
echo "creating output directory"
mkdir "public"
echo "creating"
break
;;
--rebuild)
cd source && grunt concat:foundation && cd -
echo "done"
break
;;
--start)
# make sure everything is fine and dandy? and then run?
grunt watch
break
;;
# grunt watch task
esac
done