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:
parent
99f0d76cee
commit
8decc17f3e
@ -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**
|
||||
|
11
README.md
11
README.md
@ -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**
|
||||
|
37
install.sh
37
install.sh
@ -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,19 +132,47 @@ if [[ ${shell} != "bash" ]] && [[ ${shell} != "zsh" ]]; then
|
||||
fi
|
||||
|
||||
# check Python version
|
||||
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 "Incompatible Python version, please upgrade to v2.7+ or v3.2+."
|
||||
echo
|
||||
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} -gt 3 ]]; then
|
||||
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/tags"
|
||||
echo -e "\thttps://github.com/joelthelion/autojump/downloads"
|
||||
echo
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "Installing ${shell} version of autojump to ${prefix} ..."
|
||||
|
Loading…
Reference in New Issue
Block a user