diff options
author | Kali Kaneko <kali@leap.se> | 2018-02-08 01:10:25 +0100 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2018-02-15 16:36:38 +0100 |
commit | 3aaa810ccb41bff27ab17130932840eefd49fb83 (patch) | |
tree | 99562af904058c0a67220125daad57146e6ec6a9 | |
parent | 29832c73adea3573ead5fcc8007419c67305014e (diff) |
[feat] new anonvpn bootstrap
-rwxr-xr-x | pkg/tools/anonvpn-bootstrap.sh | 49 | ||||
-rwxr-xr-x | pkg/tools/bitmask-bootstrap.sh | 2 |
2 files changed, 50 insertions, 1 deletions
diff --git a/pkg/tools/anonvpn-bootstrap.sh b/pkg/tools/anonvpn-bootstrap.sh new file mode 100755 index 00000000..2514c9f6 --- /dev/null +++ b/pkg/tools/anonvpn-bootstrap.sh @@ -0,0 +1,49 @@ +#!/bin/bash +####################################### +# Bootstrap an anonvpn environment # +####################################### + +set -e + +APT_DEPS="build-essential python-pip python-dev python-virtualenv libssl-dev libffi-dev openvpn" + +function add_pew_to_environment() +{ + while true; do + read -p "Do you want to add pew executable to your .zshrc?> " yn + case $yn in + [Yy]* ) echo "PATH=~/.local/bin:\$PATH" >> ~/.zshrc; echo "source \$(pew shell_config)" >> ~/.zshrc; break;; + [Nn]* ) return;; + * ) echo "Please answer yes or no.";; + esac + done +} + +function apt_install() +{ + sudo apt install $APT_DEPS + sudo pip install pew +} + +function init_pew() +{ + pew ls | grep anonvpn || echo '[+] creating new anonvpn virtualenv...' && pew new -d anonvpn +} + +function clone_repo() +{ + mkdir -p ~/leap/ && cd ~/leap + git clone https://0xacab.org/leap/bitmask-dev || echo 'not cloning: bitmask-dev already exists...' +} + +function install_deps() +{ + cd ~/leap/bitmask-dev && pew in anonvpn pip install -U -r pkg/requirements-dev.pip + cd ~/leap/bitmask-dev && pew in anonvpn make dev-backend +} + +apt_install +init_pew +clone_repo +install_deps +pew workon bitmask diff --git a/pkg/tools/bitmask-bootstrap.sh b/pkg/tools/bitmask-bootstrap.sh index 8b36288d..294dfeeb 100755 --- a/pkg/tools/bitmask-bootstrap.sh +++ b/pkg/tools/bitmask-bootstrap.sh @@ -5,7 +5,7 @@ set -e -APT_DEPS="build-essential python-pip python-dev python-virtualenv libsqlcipher-dev libssl-dev libffi-dev haveged python-pyqt5 python-pyqt5.qtwebkit gnupg1 openvpn" +APT_DEPS="build-essential python-pip python-dev python-virtualenv libsqlcipher-dev libssl-dev libffi-dev haveged python-pyqt5 python-pyqt5.qtwebengine gnupg1 openvpn" function add_pew_to_environment() { |