[zsh] Update init-env-python and init-env-playdate
This commit is contained in:
		
							parent
							
								
									aea4ff965e
								
							
						
					
					
						commit
						75e32e473a
					
				
					 5 changed files with 32 additions and 40 deletions
				
			
		
							
								
								
									
										15
									
								
								zsh/func/init-env-playdate
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								zsh/func/init-env-playdate
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| #!/usr/bin/env zsh | ||||
| # Eryn Wells <eryn@erynwells.me> | ||||
| 
 | ||||
| autoload -Uz prepend_to_path | ||||
| 
 | ||||
| function init-env-playdate | ||||
| { | ||||
|     local -r sdk_path="$HOME/Developer/PlaydateSDK" | ||||
|     if [[ -d "$sdk_date" ]]; then | ||||
|         export PLAYDATE_SDK_PATH="$sdk_path" | ||||
|         prepend_to_path "$PLAYDATE_SDK_PATH/bin" | ||||
|     fi | ||||
| } | ||||
| 
 | ||||
| init-env-playdate "$@" | ||||
							
								
								
									
										15
									
								
								zsh/func/init-env-python
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								zsh/func/init-env-python
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| # Eryn Wells <eryn@erynwells.me> | ||||
| 
 | ||||
| autoload -Uz prepend_to_path | ||||
| 
 | ||||
| function init-env-python | ||||
| { | ||||
|     local -r user_python_root="$HOME/Library/Python" | ||||
|     if [[ -d "$pythonRoot" ]]; then | ||||
|         for f in $pythonRoot/*; do | ||||
|             prepend_to_path "$f/bin" | ||||
|         done | ||||
|     fi | ||||
| } | ||||
| 
 | ||||
| init-env-python "$@" | ||||
|  | @ -1,8 +0,0 @@ | |||
| #!/usr/bin/env zsh | ||||
| # Eryn Wells <eryn@erynwells.me> | ||||
| 
 | ||||
| autoload prepend_to_path | ||||
| 
 | ||||
| export PLAYDATE_SDK_PATH="$HOME/Developer/PlaydateSDK" | ||||
| 
 | ||||
| prepend_to_path "$PLAYDATE_SDK_PATH/bin" | ||||
|  | @ -1,30 +0,0 @@ | |||
| # Eryn Wells <eryn@erynwells.me> | ||||
| 
 | ||||
| autoload -Uz prepend_to_path | ||||
| 
 | ||||
| init_env_python() { | ||||
|     local pythonRoot="$HOME/Library/Python" | ||||
|     if [[ -d "$pythonRoot" ]]; then | ||||
|         for f in $pythonRoot/*; do | ||||
|             prepend_to_path "$f/bin" | ||||
|         done | ||||
|     fi | ||||
| 
 | ||||
|     local python27SitePackages="$pythonroot/2.7/lib/python/site-packages" | ||||
|     if [[ -d "$python27SitePackages" ]]; then | ||||
|         if [[ ! -z $PYTHONPATH ]]; then | ||||
|             PYTHONPATH=$python27SitePackages:$PYTHONPATH | ||||
|         else | ||||
|             PYTHONPATH=$python27SitePackages | ||||
|         fi | ||||
|     fi | ||||
| 
 | ||||
|     export PYTHONPATH | ||||
| 
 | ||||
|     if which virtualenvwrapper.sh &> /dev/null; then | ||||
|         export WORKON_HOME="$HOME/src/py/.envs" | ||||
|         source `which virtualenvwrapper.sh` | ||||
|     fi | ||||
| } | ||||
| 
 | ||||
| init_env_python "$@" | ||||
							
								
								
									
										4
									
								
								zshenv
									
										
									
									
									
								
							
							
						
						
									
										4
									
								
								zshenv
									
										
									
									
									
								
							|  | @ -31,8 +31,8 @@ typeset -a zsh_init_env_functions=( \ | |||
|     init-path \ | ||||
|     init-unix-env \ | ||||
|     init-zsh-helpers \ | ||||
|     init_env_python \ | ||||
|     init_env_playdate \ | ||||
|     init-env-python \ | ||||
|     init-env-playdate \ | ||||
|     init-vi \ | ||||
|     init_env_$SYS \ | ||||
| ) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue