This repository was archived by the owner on Nov 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathdev-env.sh
29 lines (21 loc) · 1.7 KB
/
dev-env.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
# This file is meant to be sourced into the shell environment
[ ! -d .git -o ! -d ./api_server ] && echo "change to the root of your codestream-server repo before sourcing in this file" && return 1
[ -n "$CSBE_SANDBOX" ] && echo "this env config is not compatble with your dev_tools sandbox" && return 1
[ -f .sandbox-config.sh ] && source .sandbox-config.sh && echo "loading .sandbox-config.sh"
[ -z "$CSSVC_BACKEND_ROOT" ] && export CSSVC_BACKEND_ROOT=$(pwd)
# [ -z "$CSSVC_ENV" ] && export CSSVC_ENV=local
[ -z "$CSSVC_CFG_URL" ] && export CSSVC_CFG_URL=mongodb://localhost/codestream
# update paths
export PATH=$CSSVC_BACKEND_ROOT/api_server/bin:$CSSVC_BACKEND_ROOT/broadcaster/bin:$CSSVC_BACKEND_ROOT/outbound_email/bin:$CSSVC_BACKEND_ROOT/inbound_email/bin:$PATH
export NODE_PATH=$CSSVC_BACKEND_ROOT/api_server/node_modules:$CSSVC_BACKEND_ROOT/broadcaster/node_modules:$CSSVC_BACKEND_ROOT/outbound_email/server/node_modules:$CSSVC_BACKEND_ROOT/inbound_email/node_modules:$NODE_PATH
[ ! -d "$CSSVC_BACKEND_ROOT/log" ] && { echo "creating $CSSVC_BACKEND_ROOT/log/ for run-time logs" && mkdir $CSSVC_BACKEND_ROOT/log || return 1; }
# temporary - these need to be removed from the default.json file
[ -z "$OPADM_LOGS" ] && export OPADM_LOGS=$CSSVC_BACKEND_ROOT/log
[ -z "$CS_API_LOGS" ] && export CS_API_LOGS=$CSSVC_BACKEND_ROOT/log
[ -z "$CS_BROADCASTER_SANDBOX" ] && export CS_BROADCASTER_SANDBOX=$CSSVC_BACKEND_ROOT
[ -z "$CS_MAILIN_SANDBOX" ] && export CS_MAILIN_SANDBOX=$CSSVC_BACKEND_ROOT
[ -z "$CS_OUTBOUND_EMAIL_LOGS" ] && export CS_OUTBOUND_EMAIL_LOGS=$CSSVC_BACKEND_ROOT/log
[ -z "$CS_OUTBOUND_EMAIL_TMP" ] && export CS_OUTBOUND_EMAIL_TMP=$CSSVC_BACKEND_ROOT/log
[[ "$SHELL" == *zsh* ]] && rehash
env | grep ^CSSVC_
return 0