Fixed formatting, very minor issues caught by shellcheck
This commit is contained in:
		
							parent
							
								
									fa02cc2231
								
							
						
					
					
						commit
						c36d9ef1c8
					
				
							
								
								
									
										9
									
								
								qq2clone
								
								
								
								
							
							
						
						
									
										9
									
								
								qq2clone
								
								
								
								
							|  | @ -185,7 +185,7 @@ declare -g lv_api_temp; | ||||||
| lv_api_temp="$(mktemp -d )" || temp_error | lv_api_temp="$(mktemp -d )" || temp_error | ||||||
| mkfifo "${lv_api_temp}/lv_api_do_fifo" || fifo_error | mkfifo "${lv_api_temp}/lv_api_do_fifo" || fifo_error | ||||||
| exec 4<>"${lv_api_temp}/lv_api_do_fifo" | exec 4<>"${lv_api_temp}/lv_api_do_fifo" | ||||||
| ${QQ2_DIR}/lv_api_do <&4 >&3 2>/dev/null & | "${QQ2_DIR}/lv_api_do" <&4 >&3 2>/dev/null & | ||||||
| 
 | 
 | ||||||
| local check | local check | ||||||
| read -r check <&3 | read -r check <&3 | ||||||
|  | @ -340,6 +340,7 @@ else | ||||||
| fi | fi | ||||||
| return 0 | return 0 | ||||||
| } | } | ||||||
|  | #=========================================================================# | ||||||
| first_run_setup () | first_run_setup () | ||||||
| # DESCRIPTION: Generate a new database with default config values, | # DESCRIPTION: Generate a new database with default config values, | ||||||
| #   create subdirectories of QQ2_DIR | #   create subdirectories of QQ2_DIR | ||||||
|  | @ -399,8 +400,7 @@ return 0 | ||||||
| get_config () | get_config () | ||||||
| # DESCRIPTION: Load configuration from database | # DESCRIPTION: Load configuration from database | ||||||
| # INPUT: None | # INPUT: None | ||||||
| # OUTPUT: Error message and exit $E_config if there is a problem, otherwise | # OUTPUT: Silent except on error | ||||||
| #   declare and populate global array OPT |  | ||||||
| # PARAMETERS: None | # PARAMETERS: None | ||||||
| #=========================================================================# | #=========================================================================# | ||||||
| { | { | ||||||
|  | @ -413,7 +413,7 @@ read -r check \ | ||||||
|   < <(sqlite3 "select exists ( select * from CONFIG)") |   < <(sqlite3 "select exists ( select * from CONFIG)") | ||||||
| ((check)) || | ((check)) || | ||||||
|   { echo "Is the database corrupt? No CONFIG table!" 2>/dev/null;  |   { echo "Is the database corrupt? No CONFIG table!" 2>/dev/null;  | ||||||
|     exit "$E_config"; } |     exit "$E_unexpected"; } | ||||||
| 
 | 
 | ||||||
| chmod +x "${QQ2_DIR}/lv_api_do" &>/dev/null || | chmod +x "${QQ2_DIR}/lv_api_do" &>/dev/null || | ||||||
|   { echo "lv_api_do is missing from $QQ2_DIR, or has bad permissions"; |   { echo "lv_api_do is missing from $QQ2_DIR, or has bad permissions"; | ||||||
|  | @ -630,6 +630,7 @@ while read -r line; do | ||||||
| done < <(read_pipe) | done < <(read_pipe) | ||||||
| return 0 | return 0 | ||||||
| } | } | ||||||
|  | #=========================================================================# | ||||||
| get_disk_devices_db () | get_disk_devices_db () | ||||||
| # DESCRIPTION: Like get_disk_devices, but get info from the database | # DESCRIPTION: Like get_disk_devices, but get info from the database | ||||||
| # INPUT: Machine number, or omit to get template info | # INPUT: Machine number, or omit to get template info | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue