forked from StudioEtrange/ngrok-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
stella-link.sh
executable file
·41 lines (38 loc) · 1.13 KB
/
stella-link.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
_STELLA_LINK_CURRENT_FILE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export STELLA_ROOT=$_STELLA_LINK_CURRENT_FILE_DIR/../stella
STELLA_DEP_FLAVOUR=DEV
STELLA_DEP_VERSION=0.0.3-15-g8bc50be
[ ! "$1" == "chaining" ] && STELLA_APP_ROOT=$_STELLA_LINK_CURRENT_FILE_DIR
if [ ! "$1" == "nothing" ]; then
if [ ! "$1" == "bootstrap" ]; then
if [ ! -f "$STELLA_ROOT/stella.sh" ]; then
if [ -f "$(dirname $STELLA_ROOT)/stella-link.sh" ]; then
echo " ** Try to chain link stella from $(dirname $STELLA_ROOT)"
source $(dirname $STELLA_ROOT)/stella-link.sh chaining
else
echo "** WARNING Stella is missing -- bootstraping stella"
$_STELLA_LINK_CURRENT_FILE_DIR/stella-link.sh bootstrap
fi
fi
fi
fi
ACTION=$1
case $ACTION in
include)
source "$STELLA_ROOT/conf.sh"
__init_stella_env
;;
bootstrap)
cd "$_STELLA_LINK_CURRENT_FILE_DIR"
curl -sSL https://raw.githubusercontent.com/StudioEtrange/stella/master/nix/pool/stella-bridge.sh -o stella-bridge.sh
chmod +x stella-bridge.sh
./stella-bridge.sh bootstrap
rm -f stella-bridge.sh
;;
nothing|chaining)
;;
*)
$STELLA_ROOT/stella.sh $*
;;
esac