Fix issue with outdated pip & bomutils non-empty dir

readme-wiki
alexander rymdeko-harvey 2017-12-23 18:31:16 -05:00
parent 1b9cae7e02
commit 3034750e58
1 changed files with 9 additions and 5 deletions

View File

@ -4,7 +4,7 @@
# functions
# Install Powershell on Linux
function install_powershell {
function install_powershell() {
if uname | grep -q "Darwin"; then
brew install openssl
brew install curl --with-openssl
@ -45,6 +45,7 @@ fi
if ! which pip > /dev/null; then
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
pip install --upgrade pip
fi
if uname | grep -q "Darwin"; then
@ -61,20 +62,24 @@ else
if lsb_release -d | grep -q "Fedora"; then
Release=Fedora
sudo dnf install -y make g++ python-devel m2crypto python-m2ext swig python-iptools python3-iptools libxml2-devel default-jdk openssl-devel libssl1.0.0 libssl-dev
pip install --upgrade pip
sudo pip install -r requirements.txt
elif lsb_release -d | grep -q "Kali"; then
Release=Kali
sudo apt-get install -y make g++ python-dev python-m2crypto swig python-pip libxml2-dev default-jdk libssl1.0.0 libssl-dev
pip install --upgrade pip
sudo pip install -r requirements.txt
install_powershell
elif lsb_release -d | grep -q "Ubuntu"; then
Release=Ubuntu
sudo apt-get install -y make g++ python-dev python-m2crypto swig python-pip libxml2-dev default-jdk libssl1.0.0 libssl-dev
pip install --upgrade pip
sudo pip install -r requirements.txt
install_powershell
else
echo "Unknown distro - Debian/Ubuntu Fallback"
sudo apt-get install -y make g++ python-dev python-m2crypto swig python-pip libxml2-dev default-jdk libffi-dev libssl1.0.0 libssl-dev
pip install --upgrade pip
sudo pip install -r requirements.txt
install_powershell
fi
@ -86,9 +91,9 @@ tar -xvf ../data/misc/xar-1.5.2.tar.gz
(cd xar-1.5.2 && make)
(cd xar-1.5.2 && sudo make install)
# Installing bomutils
git clone https://github.com/hogliux/bomutils.git
(cd bomutils && make)
# Installing bomutils into non-empty dir
(cd bomutils && git init . && git remote add -t \* -f origin https://github.com/hogliux/bomutils.git && git checkout master)
# Normal install: git clone https://github.com/hogliux/bomutils.git
# NIT: This fails on OSX. Leaving it only on Linux instances.
if uname | grep -q "Linux"; then
@ -96,7 +101,6 @@ if uname | grep -q "Linux"; then
fi
chmod 755 bomutils/build/bin/mkbom && sudo cp bomutils/build/bin/mkbom /usr/local/bin/.
# set up the database schema
./setup_database.py