mirror of
https://github.com/wting/autojump
synced 2024-10-27 20:34:07 +00:00
check python version during install and warn if incompatible
This commit is contained in:
parent
8e86f08625
commit
2d502a00cf
10
install.sh
10
install.sh
@ -91,8 +91,18 @@ while true; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# check Python version
|
||||||
|
python_version=`python -c 'import sys; print(sys.version_info[:])'`
|
||||||
|
if [[ ${python_version:1:1} -eq 2 && ${python_version:4:1} -lt 6 ]]; then
|
||||||
|
echo
|
||||||
|
echo "Incompatible Python version, please upgrade Python to v2.6+"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# check for valid options
|
||||||
if [[ ${UID} != 0 ]] && [ ! ${local} ]; then
|
if [[ ${UID} != 0 ]] && [ ! ${local} ]; then
|
||||||
|
echo
|
||||||
echo "Please rerun as root or use the --local option."
|
echo "Please rerun as root or use the --local option."
|
||||||
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user