-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphoenixapp.bits
More file actions
47 lines (35 loc) · 1.01 KB
/
phoenixapp.bits
File metadata and controls
47 lines (35 loc) · 1.01 KB
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
#!/bin/bash
#-----------
# VARIABLES
#-----------
GIT_URL=${GIT_URL-"git@bitbucket.org:capbash/samplephoenix.git"}
GIT_BRANCH=${GIT_BRANCH-master}
PROJECT_NAME=${PROJECT_NAME-"samplephoenix"}
SRC_DIR=${SRC_DIR-/src}
#-----------
# INSTALLER
#-----------
[ "`which bits 2> /dev/null`" == "" ] && bash <(curl -s https://raw.githubusercontent.com/capbash/bits/master/bits-installer)
bits install-if knownhosts
bits install-if phoenix
bits install gitconfig
source $HOME/.bash_aliases
APP_DIR="$SRC_DIR/$PROJECT_NAME"
if [[ -e "$APP_DIR" ]]; then
rm -rf "$APP_DIR"
fi
mkdir -p $SRC_DIR && cd $SRC_DIR && git clone $GIT_URL $PROJECT_NAME
(cd $APP_DIR && \
git checkout $GIT_BRANCH && \
mix deps.get && \
mix deps.compile --force && \
mix compile && \
npm install && \
npm rebuild node-sass)
# Some bugs needs hacks
# If you have a hack script, then call it after all the normal things have been done
if [[ -e "$APP_DIR/bin/hack" ]]; then
(cd $APP_DIR && \
./bin/hack)
fi
touch /opt/phoenix.$PROJECT_NAME.bits