1
0
mirror of https://github.com/wting/autojump synced 2024-10-27 20:34:07 +00:00

Update documentation and install scripts to reflect new minimum Python requirements.

Documentation and install scripts now instruct older Python users to upgrade
their Python version or install older versions of autojump.

'install.sh' now gets a -f|--force option, which makes the install ignore
Python dependency requirements.
This commit is contained in:
William Ting 2012-04-11 23:03:03 -10:00
parent 99f0d76cee
commit 8decc17f3e
3 changed files with 58 additions and 8 deletions

View File

@ -6,6 +6,12 @@ Python v2.7+ or 3.2+
Bash v4.0+ for tab completion
If you are unable to update Python to a supported version, older versions of autojump can be [downloaded](https://github.com/joelthelion/autojump/downloads) and installed manually.
Python v2.6+ is supported by [release v19](https://github.com/downloads/joelthelion/autojump/autojump_v19.tar.gz).
Python v2.4+ is supported by [release v12](https://github.com/downloads/joelthelion/autojump/autojump_v12.tar.gz).
### AUTOMATIC INSTALLATION
**Linux**

View File

@ -122,6 +122,17 @@ Python v2.7+ or 3.2+
Bash v4.0+ for tab completion
If you are unable to update Python to a supported version, older
versions of autojump can be
[downloaded](https://github.com/joelthelion/autojump/downloads) and
installed manually.
Python v2.6+ is supported by [release
v19](https://github.com/downloads/joelthelion/autojump/autojump_v19.tar.gz).
Python v2.4+ is supported by [release
v12](https://github.com/downloads/joelthelion/autojump/autojump_v12.tar.gz).
### AUTOMATIC INSTALLATION
**Linux**

View File

@ -47,6 +47,7 @@ function help_msg {
# Default install directory.
shell=`echo ${SHELL} | awk -F/ '{ print $NF }'`
force=
if [[ ${UID} -eq 0 ]]; then
local=
prefix=/usr
@ -72,6 +73,10 @@ while true; do
shell="bash"
shift
;;
-f|--force)
force=true
shift
;;
-g|--global)
local=
shift
@ -127,18 +132,46 @@ if [[ ${shell} != "bash" ]] && [[ ${shell} != "zsh" ]]; then
fi
# 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 7 ]]; then
echo
echo "Incompatible Python version, please upgrade to v2.7+ or v3.2+."
if [[ ${python_version:4:1} -gt 3 ]]; then
if [ ! ${force} ]; then
python_version=`python -c 'import sys; print(sys.version_info[:])'`
if [[ ${python_version:1:1} -eq 3 && ${python_version:4:1} -lt 2 ]]; then
echo
echo "Alternatively, you can download v12 that supports Python v2.4+ from:"
echo "Incompatible Python version, please upgrade to v2.7+ or v3.2+."
echo
echo -e "\thttps://github.com/joelthelion/autojump/tags"
echo "Alternatively, you can download v19 that supports Python v3.0+ from:"
echo
echo -e "\thttps://github.com/joelthelion/autojump/downloads"
echo
echo "OR"
echo
echo "Install argparse manually using 'pip install argparse' and then reattempt the installation using the --force option."
echo
exit 1
fi
if [[ ${python_version:1:1} -eq 2 && ${python_version:4:1} -lt 7 ]]; then
echo
echo "Incompatible Python version, please upgrade to v2.7+ or v3.2+."
if [[ ${python_version:4:1} -ge 6 ]]; then
echo
echo "Alternatively, you can download v19 that supports Python v2.6+ from:"
echo
echo -e "\thttps://github.com/joelthelion/autojump/downloads"
echo
echo "OR"
echo
echo "Install argparse manually using 'pip install argparse' and then reattempt the installation using the --force option."
echo
elif [[ ${python_version:4:1} -ge 4 ]]; then
echo
echo "Alternatively, you can download v12 that supports Python v2.4+ from:"
echo
echo -e "\thttps://github.com/joelthelion/autojump/downloads"
echo
fi
exit 1
fi
exit 1
fi
echo