Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions 56 install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/bin/bash

DOWNLOADED=false
if [ "$(id -u)" != "0" ]; then
echo "Sorry, you are not root."
exit 1
fi

echo "This script will guide you to install the PythonMiniProbe"

echo "installing python-dev and build-essentials"
apt-get -y install python-dev build-essential 2>&1 >> /dev/null

case "$(python --version 2>&1)" in
*" 2.7.9"*)
echo "Correct python version!"
;;
*" 3."*)
echo "Correct python version!"
;;
*)
echo "Installing PIP!"
apt-get -y install python-pip 2>&1 >> /dev/null
;;
esac

if [ ! -f ./README.md ]
read -p "Use git to install the miniprobe (y|n)? " -n 1 -r
echo # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]
then
git clone https://github.com/PaesslerAG/PythonMiniProbe.git /PythonMiniProbe
cd /PythonMiniProbe
DOWNLOADED=true
else
read -p "Use wget to install the miniprobe (y|n)? " -n 1 -r
echo # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]
then
wget -O /tmp/probe.zip https://github.com/PaesslerAG/PythonMiniProbe/archive/master.zip
unzip /tmp/probe.zip -d /tmp
mv /tmp/PythonMiniProbe-master /PythonMiniProbe
cd /PythonMiniProbe
DOWNLOADED=true
fi
fi
else
DOWNLOADED=true
fi

if [ "$DOWNLOADED" = true ]
then
echo "Starting to install the miniprobe and requirements"
python setup.py install
python setup.py configure
fi
Morty Proxy This is a proxified and sanitized view of the page, visit original site.