2016-10-05 01:00:11 +02:00
|
|
|
#!/bin/bash
|
|
|
|
pushd "$(dirname ${BASH_SOURCE[0]})" > /dev/null
|
|
|
|
if [ ! -d ./tlslite ]; then
|
2017-01-23 16:12:34 +01:00
|
|
|
echo -e "\n${BASH_SOURCE[0]}: tlslite-ng not found, downloading..."
|
2017-01-23 15:27:04 +01:00
|
|
|
git clone --depth=1 https://github.com/tomato42/tlslite-ng.git .tlslite-ng
|
2016-10-05 01:00:11 +02:00
|
|
|
ln -s .tlslite-ng/tlslite tlslite
|
|
|
|
fi
|
|
|
|
if [ ! -d ./ecdsa ]; then
|
2017-01-23 16:12:34 +01:00
|
|
|
echo -e "\n${BASH_SOURCE[0]}: python-ecdsa not found, downloading..."
|
2017-01-23 15:27:04 +01:00
|
|
|
git clone --depth=1 https://github.com/warner/python-ecdsa.git .python-ecdsa
|
2017-01-23 07:36:24 +01:00
|
|
|
ln -s .python-ecdsa/src/ecdsa ecdsa
|
2016-10-05 01:00:11 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
# update the code if it is running in interactive terminal
|
|
|
|
#if [[ -t 1 ]]; then
|
|
|
|
if [[ $UPDATE ]]; then
|
|
|
|
pushd .tlslite-ng >/dev/null
|
|
|
|
git pull origin master --quiet
|
|
|
|
popd >/dev/null
|
|
|
|
pushd .python-ecdsa >/dev/null
|
|
|
|
git pull origin master --quiet
|
|
|
|
popd >/dev/null
|
|
|
|
fi
|
|
|
|
|
|
|
|
PYTHONPATH=. python cscan.py "$@"
|
|
|
|
ret=$?
|
|
|
|
popd > /dev/null
|
|
|
|
exit $ret
|