Fix issue with outdated pip & bomutils non-empty dir
parent
1b9cae7e02
commit
3034750e58
|
@ -4,7 +4,7 @@
|
||||||
# functions
|
# functions
|
||||||
|
|
||||||
# Install Powershell on Linux
|
# Install Powershell on Linux
|
||||||
function install_powershell {
|
function install_powershell() {
|
||||||
if uname | grep -q "Darwin"; then
|
if uname | grep -q "Darwin"; then
|
||||||
brew install openssl
|
brew install openssl
|
||||||
brew install curl --with-openssl
|
brew install curl --with-openssl
|
||||||
|
@ -45,6 +45,7 @@ fi
|
||||||
if ! which pip > /dev/null; then
|
if ! which pip > /dev/null; then
|
||||||
wget https://bootstrap.pypa.io/get-pip.py
|
wget https://bootstrap.pypa.io/get-pip.py
|
||||||
python get-pip.py
|
python get-pip.py
|
||||||
|
pip install --upgrade pip
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if uname | grep -q "Darwin"; then
|
if uname | grep -q "Darwin"; then
|
||||||
|
@ -61,20 +62,24 @@ else
|
||||||
if lsb_release -d | grep -q "Fedora"; then
|
if lsb_release -d | grep -q "Fedora"; then
|
||||||
Release=Fedora
|
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
|
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
|
sudo pip install -r requirements.txt
|
||||||
elif lsb_release -d | grep -q "Kali"; then
|
elif lsb_release -d | grep -q "Kali"; then
|
||||||
Release=Kali
|
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
|
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
|
sudo pip install -r requirements.txt
|
||||||
install_powershell
|
install_powershell
|
||||||
elif lsb_release -d | grep -q "Ubuntu"; then
|
elif lsb_release -d | grep -q "Ubuntu"; then
|
||||||
Release=Ubuntu
|
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
|
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
|
sudo pip install -r requirements.txt
|
||||||
install_powershell
|
install_powershell
|
||||||
else
|
else
|
||||||
echo "Unknown distro - Debian/Ubuntu Fallback"
|
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
|
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
|
sudo pip install -r requirements.txt
|
||||||
install_powershell
|
install_powershell
|
||||||
fi
|
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 && make)
|
||||||
(cd xar-1.5.2 && sudo make install)
|
(cd xar-1.5.2 && sudo make install)
|
||||||
|
|
||||||
# Installing bomutils
|
# Installing bomutils into non-empty dir
|
||||||
git clone https://github.com/hogliux/bomutils.git
|
(cd bomutils && git init . && git remote add -t \* -f origin https://github.com/hogliux/bomutils.git && git checkout master)
|
||||||
(cd bomutils && make)
|
# Normal install: git clone https://github.com/hogliux/bomutils.git
|
||||||
|
|
||||||
# NIT: This fails on OSX. Leaving it only on Linux instances.
|
# NIT: This fails on OSX. Leaving it only on Linux instances.
|
||||||
if uname | grep -q "Linux"; then
|
if uname | grep -q "Linux"; then
|
||||||
|
@ -96,7 +101,6 @@ if uname | grep -q "Linux"; then
|
||||||
fi
|
fi
|
||||||
chmod 755 bomutils/build/bin/mkbom && sudo cp bomutils/build/bin/mkbom /usr/local/bin/.
|
chmod 755 bomutils/build/bin/mkbom && sudo cp bomutils/build/bin/mkbom /usr/local/bin/.
|
||||||
|
|
||||||
|
|
||||||
# set up the database schema
|
# set up the database schema
|
||||||
./setup_database.py
|
./setup_database.py
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue