mirror of
				https://github.com/wting/autojump
				synced 2025-06-13 12:54:07 +00:00 
			
		
		
		
	Merge pull request #105 from wting/python_check
Python version check during installation
This commit is contained in:
		
						commit
						2b5099e6f5
					
				| @ -73,6 +73,11 @@ GNU General Public License for more details. | ||||
| You should have received a copy of the GNU General Public License | ||||
| along with autojump.  If not, see <http://www.gnu.org/licenses/>. | ||||
| 
 | ||||
| Requirements | ||||
| ============ | ||||
| 
 | ||||
| Python v2.6+ or 3.0+ | ||||
| 
 | ||||
| Installation | ||||
| ============ | ||||
| 
 | ||||
|  | ||||
							
								
								
									
										10
									
								
								install.sh
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								install.sh
									
									
									
									
									
								
							| @ -91,8 +91,18 @@ while true; do | ||||
|     esac | ||||
| 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 | ||||
|     echo | ||||
|     echo "Please rerun as root or use the --local option." | ||||
|     echo | ||||
|     exit 1 | ||||
| fi | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user