1 | #!/usr/bin/env bash
|
2 |
|
3 |
|
4 | YARN=$(which yarn)
|
5 | SUMAN_DEBUG_LOG_PATH=$HOME/.suman/suman-debug.log
|
6 |
|
7 | if [[ -z "${YARN}" ]]; then
|
8 |
|
9 | if [[ ! -z "${SUMAN_DEBUG}" ]]; then
|
10 | echo "need SUDO to install yarn installed successfully" >> ${SUMAN_DEBUG_LOG_PATH};
|
11 | fi
|
12 | else
|
13 | if [[ ! -z "${SUMAN_DEBUG}" ]]; then
|
14 | echo "yarn already installed here => $YARN" >> ${SUMAN_DEBUG_LOG_PATH};
|
15 | fi
|
16 | fi
|
17 |
|
18 |
|
19 |
|
20 | SUMAN_BASE_DIRECTORY=$(echo "$PWD" | cut -d "/" -f2)
|
21 |
|
22 | if [[ ! -z "${SUMAN_DEBUG}" ]]; then
|
23 | echo "BASE_DIRECTORY of PWD => $SUMAN_BASE_DIRECTORY" ;
|
24 | fi
|
25 |
|
26 |
|
27 |
|
28 |
|
29 | (cd $HOME/.suman/global && npm init -f >> ${SUMAN_DEBUG_LOG_PATH} 2>&1) &
|
30 |
|
31 | wait;
|
32 |
|
33 | node $(dirname "$0")/install-optional-deps.js >> ${SUMAN_DEBUG_LOG_PATH} 2>&1
|
34 |
|