mirror of
				https://github.com/mitchell/dotfiles.git
				synced 2025-11-03 21:25:26 +00:00 
			
		
		
		
	Find distro in provision_linux
This commit is contained in:
		
							parent
							
								
									feb620260a
								
							
						
					
					
						commit
						6ac114a975
					
				| 
						 | 
					@ -3,12 +3,16 @@
 | 
				
			||||||
### Config ###
 | 
					### Config ###
 | 
				
			||||||
 | 
					
 | 
				
			||||||
set -g cmd_func_prefix 'provision'
 | 
					set -g cmd_func_prefix 'provision'
 | 
				
			||||||
 | 
					set -g distro
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if test -z "$distro"
 | 
					for line in (cat /etc/os-release)
 | 
				
			||||||
    set -g distro 'arch'
 | 
					    set -l items (string split --max 1 '=' $line)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if test $items[1] = 'ID'
 | 
				
			||||||
 | 
					        set distro $items[2]
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
### Commands ###
 | 
					### Commands ###
 | 
				
			||||||
# Add, edit, and remove commands freely below.
 | 
					# Add, edit, and remove commands freely below.
 | 
				
			||||||
# To add a command simply create a function with this naming scheme: {run_func_prefix}_{name}.
 | 
					# To add a command simply create a function with this naming scheme: {run_func_prefix}_{name}.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue