Added flag for generating .xinitrc and .xprofile.
This commit is contained in:
		
							
								
								
									
										7
									
								
								i38.sh
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								i38.sh
									
									
									
									
									
								
							| @@ -128,6 +128,7 @@ fi | |||||||
| # Array of command line arguments | # Array of command line arguments | ||||||
| declare -A command=( | declare -A command=( | ||||||
|     [h]="This help screen." |     [h]="This help screen." | ||||||
|  |     [x]="Generate ~/.xinitrc and ~/.xprofile." | ||||||
| ) | ) | ||||||
|  |  | ||||||
| # Convert the keys of the associative array to a format usable by getopts | # Convert the keys of the associative array to a format usable by getopts | ||||||
| @@ -136,15 +137,11 @@ args="${args//[[:space:]]/}" | |||||||
| while getopts "${args}" i ; do | while getopts "${args}" i ; do | ||||||
|     case "$i" in |     case "$i" in | ||||||
|         h) help;; |         h) help;; | ||||||
|  |         x) write_xinitrc | ||||||
|     esac |     esac | ||||||
| done | done | ||||||
|  |  | ||||||
|  |  | ||||||
| # Create .xinitrc file if requested |  | ||||||
| if [[ "$1" = "-x" || "$1" = "--xinitrc" ]]; then |  | ||||||
| write_xinitrc |  | ||||||
| exit 0 |  | ||||||
| fi |  | ||||||
| # Make sure rc variable is empty | # Make sure rc variable is empty | ||||||
| unset rc | unset rc | ||||||
| # Set  path for helper scripts. | # Set  path for helper scripts. | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user