Skip to content

Commit

Permalink
mhm
Browse files Browse the repository at this point in the history
  • Loading branch information
codekansas committed Feb 1, 2018
1 parent 5673cea commit 356e210
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ install:
- export PATH="$HOME/miniconda/bin:$PATH"
- python -c 'import os,sys,fcntl; flags = fcntl.fcntl(sys.stdout, fcntl.F_GETFL); fcntl.fcntl(sys.stdout, fcntl.F_SETFL, flags&~os.O_NONBLOCK);'
- pushd deploy
- yes | ./install_taxbrain_server.sh
- ./install_taxbrain_server.sh --all
- popd
- source activate aei_dropq

Expand Down
26 changes: 19 additions & 7 deletions deploy/install_taxbrain_server.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash
# Interactive installation script.
# For a fresh install, simply run:
# yes | ./install_taxbrain_server.sh
# ./install_taxbrain_server.sh --all
# Optionally, pipe all output to /dev/null:
# yes | ./install_taxbrain_server.sh > /dev/null
# ./install_taxbrain_server.sh --all > /dev/null
# For slow connections, it is helpful to increase the timeout for package downloads.
# To do so, add the following to your ~/.condarc file:
# remote_read_timeout_secs: 1000.0
Expand All @@ -29,8 +29,18 @@ AEI_ENV_NAME='aei_dropq'
# The path to the dropq_environment.yml definition.
DROPQ_YML_PATH=${SCRIPT_DIR}/fab/dropq_environment.yml

# Setting to run everything automatically.
RUN_ALL=0
if [[ $# -eq 1 && $1 == "--all" ]]; then
RUN_ALL=1
fi

# Defines a finction that prompts the user for a particular action.
prompt_user() {
if [[ $RUN_ALL -eq 1 ]]; then
echo "$1 :: YES"
return 0
fi
printf "$1 [y/N] "
read -p "" -n 1 -r
echo
Expand Down Expand Up @@ -59,11 +69,13 @@ fi
echo "source activate $AEI_ENV_NAME"
source activate $AEI_ENV_NAME

conda install \
--yes \
-c ospc/label/dev \
-c ospc \
--file ${SCRIPT_DIR}/../conda-requirements.txt
if prompt_user "Install conda requirements?"; then
conda install \
--yes \
-c ospc/label/dev \
-c ospc \
--file ${SCRIPT_DIR}/../conda-requirements.txt
fi

# Installs package requirements (including the current package).
if prompt_user "Install package requirements?"; then
Expand Down

0 comments on commit 356e210

Please sign in to comment.