forked from bannerclick/bannerclick
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·48 lines (34 loc) · 1.56 KB
/
install.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
42
43
44
45
46
47
48
#!/bin/bash
# This script automates the creation and installation
# of the conda environmnet. It's useful for working
# in the docker file and on travis, but it's not
# necessary for individual users to use it.
# Developers are encouraged to only run scripts
# that they fully understand, and may prefer to
# run aspects of this script manually to set-up
# openwpm.
# This script will remove an existing openwpm
# conda environment if it exists.
# Arguments:
# --skip-create: Doesn't change the openwpm conda environment
set -e
# Make conda available to shell script
eval "$(conda shell.bash hook)"
if [ "$1" != "--skip-create" ]; then
echo 'Creating / Overwriting openwpm conda environment.'
# `PYTHONNOUSERSITE` set so python ignores local user site libraries when building the env
# See: https://github.com/openwpm/OpenWPM/pull/682#issuecomment-645648939
# `-q` (--quiet) is used to suppress output from the conda env create command
# `-f` is used to specify the environment file
# `--force` is used to overwrite the environment if it already exists
# Depending on the conda version, the `--force` flag may not be available, in which case the `--yes` flag should be used (https://github.com/bannerclick/bannerclick/pull/6)
PYTHONNOUSERSITE=True conda env create --yes -q -f environment.yaml
fi
echo 'Activating environment.'
conda activate openwpm
echo 'Installing firefox.'
./scripts/install-firefox.sh
echo 'Building extension.'
./scripts/build-extension.sh
echo 'Installation complete, activate your new environment by running:'
echo 'conda activate openwpm'