-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall
More file actions
executable file
·65 lines (50 loc) · 2.11 KB
/
install
File metadata and controls
executable file
·65 lines (50 loc) · 2.11 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash
source ./bits/bootstrap/logging
#-----------
# Configurations
#-----------
ELIXIR_VERSION=${ELIXIR_VERSION-v1.0.4}
PHOENIX_VERSION=${PHOENIX_VERSION-v0.13.0}
PHOENIX_INTERNAL_VERSION=$(echo $PHOENIX_VERSION | cut -d'v' -f 2)
PHOENIX_DISPLAY=${PHOENIX_DISPLAY-standalone} # or internal
export LOG_DIR=${LOG_DIR-/var/log}
export SRC_DIR=${SRC_DIR-/var/src}
LAUNCHER_OWNER=${LAUNCHER_OWNER-$USER}
export LAUNCHER_DIR=${LAUNCHER_DIR-/var/local}
export PHOENIX_LAUNCHER_DIR=${PHOENIX_LAUNCHER_DIR-$LAUNCHER_DIR/phoenix/$PHOENIX_VERSION}
export POSTGRES_MAJOR=${POSTGRES_MAJOR-9.4}
export POSTGRES_MINOR=${POSTGRES_MINOR-9.4.4}
export POSTGRES_VERSION=${POSTGRES_VERSION-$POSTGRES_MINOR-1.pgdg70+1}
#-----------
# Install Script
#-----------
if [[ "$PHOENIX_DISPLAY" == "standalone" ]]; then
notify "Install Phoenix (p $PHOENIX_VERSION / e $ELIXIR_VERSION) ..."
else
notify " -- Install Phoenix (p $PHOENIX_VERSION / e $ELIXIR_VERSION) ..."
fi
OWNER=$LAUNCHER_OWNER ./bits/bootstrap/mkdir \
LAUNCHER_DIR \
PHOENIX_LAUNCHER_DIR \
$PHOENIX_LAUNCHER_DIR/src \
$PHOENIX_LAUNCHER_DIR/bin
OWNER=$LAUNCHER_OWNER TEMPLATE=./bits/phoenix/files/bin LOCATION=$PHOENIX_LAUNCHER_DIR/bin \
./bits/docker/copyallif
SRC_NAME=phoenix_new-$PHOENIX_INTERNAL_VERSION.ez SRC_DIR=${PHOENIX_LAUNCHER_DIR}/src \
NAME="Phoenix ${PHOENIX_VERSION}" \
REMOTE_URL=https://github.com/phoenixframework/phoenix/releases/download/$PHOENIX_VERSION \
./bits/bootstrap/wget
OWNER=$LAUNCHER_OWNER LAUNCHER_DIR=$PHOENIX_LAUNCHER_DIR BIT=phoenix ./bits/docker/copydockerfile \
@ELIXIR_VERSION@ $ELIXIR_VERSION \
@PHOENIX_VERSION@ $PHOENIX_VERSION \
@PHOENIX_INTERNAL_VERSION@ $PHOENIX_INTERNAL_VERSION \
@POSTGRES_MAJOR@ $POSTGRES_MAJOR \
@POSTGRES_VERSION@ $POSTGRES_VERSION
LAUNCHER_DIR=$PHOENIX_LAUNCHER_DIR NAME=phoenix VERSION=${PHOENIX_VERSION} ./bits/docker/build
NAME=phoenix DIR=$PHOENIX_LAUNCHER_DIR BIT=phoenix VERSION=${PHOENIX_VERSION} ./bits/docker/helpers
DIR=./bits/phoenix ./bits/bootstrap/cleanup
if [[ "$PHOENIX_DISPLAY" == "standalone" ]]; then
notify "DONE, Install Phoenix."
else
notify " -- DONE, Install Phoenix."
fi