mirror of
				https://github.com/ItsDrike/dotfiles.git
				synced 2025-10-30 23:56:35 +00:00 
			
		
		
		
	Major rewrite (new install)
This commit is contained in:
		
							parent
							
								
									4e89803237
								
							
						
					
					
						commit
						e78b421565
					
				
					 158 changed files with 2542 additions and 5238 deletions
				
			
		|  | @ -14,4 +14,11 @@ script_name="$0" | |||
| shell="$(getent passwd "$USER" | awk -F: '{print $NF}')" | ||||
| command=("$@") | ||||
| 
 | ||||
| # This syntax might be a bit confusing at first. It works as follows: | ||||
| # 1. Replace this wrapper process with the user's login shell (through exec) | ||||
| # 2. The shell is told to run 'exec $@' replacing itself with another process | ||||
| # 3. The $@ in the exec above referrs to the arguments passed the shell (after -c '...') | ||||
| # 4. "$script_name" is passed to the shell as $0 (process name), not included in $@ | ||||
| # 5. The ${command[@]} matches the $@ which this script was called with | ||||
| # -> The command passed into this script as args is ran within the user's shell | ||||
| exec "$shell" -c 'exec "$@"' "$script_name" "${command[@]}" | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue