mirror of
				https://github.com/cmderdev/cmder.git
				synced 2025-10-31 09:22:15 +08:00 
			
		
		
		
	Fixed som misc stuff and prevented multi runs
This commit is contained in:
		
							
								
								
									
										13
									
								
								vendor/cmder_exinit
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										13
									
								
								vendor/cmder_exinit
									
									
									
									
										vendored
									
									
								
							| @@ -19,14 +19,23 @@ | ||||
| # Add system specific users customizations to $HOME/.bashrc, these  | ||||
| # customizations will not follow Cmder to another machine. | ||||
|  | ||||
| # Check that we haven't already been sourced. | ||||
| [[ -z ${CMDER_EXINIT} ]] && CMDER_EXINIT="1" || return | ||||
|  | ||||
| # We do this for bash as admin sessions since $CMDER_ROOT is not being set | ||||
| if [ "$CMDER_ROOT" = "" -a "$ConEmuDir" != "" ] ; then | ||||
|   case "$ConEmuDir" in *\\*) CMDER_ROOT=$( cd "$(cygpath -u "$ConEmuDir")/../.." ; pwd );; esac | ||||
|   if [ !-d $CMDER_ROOT/vendor ] ; then | ||||
|     echo "Running in ConEmu without Cmder, skipping Cmder integration." | ||||
|     return | ||||
|   fi | ||||
| elif [ "$CMDER_ROOT" != "" ] ; then | ||||
|   case "$CMDER_ROOT" in *\\*) CMDER_ROOT="$(cygpath -u "$CMDER_ROOT")";; esac | ||||
| else | ||||
|   break # This is a HACK to exit this script without exiting all running scripts. | ||||
| fi >/dev/null 2>&1 # This prevents showing errors when the above HACK happens. | ||||
|   return | ||||
| fi | ||||
|  | ||||
| echo "Using \"CMDER_ROOT\" at \"${CMDER_ROOT}\"...\n" | ||||
|  | ||||
| # Remove any trailing '/' | ||||
| CMDER_ROOT=$(echo $CMDER_ROOT | sed 's:/*$::') | ||||
|   | ||||
		Reference in New Issue
	
	Block a user