use shfmt
This commit is contained in:
		
							
								
								
									
										8
									
								
								update
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								update
									
									
									
									
									
								
							@@ -12,20 +12,20 @@ EXIT_SUCCESS=0
 | 
				
			|||||||
EXIT_FAILURE=1
 | 
					EXIT_FAILURE=1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Verify the required runtime environment
 | 
					# Verify the required runtime environment
 | 
				
			||||||
if ! command -v curl > /dev/null; then
 | 
					if ! command -v curl >/dev/null; then
 | 
				
			||||||
  echo "This script requires \"curl\" to be installed. Please install it and try again."
 | 
					  echo "This script requires \"curl\" to be installed. Please install it and try again."
 | 
				
			||||||
  exit $EXIT_FAILURE
 | 
					  exit $EXIT_FAILURE
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
if ! command -v nkf > /dev/null; then
 | 
					if ! command -v nkf >/dev/null; then
 | 
				
			||||||
  echo "This script requires \"nkf\" to be installed. Please install it and try again."
 | 
					  echo "This script requires \"nkf\" to be installed. Please install it and try again."
 | 
				
			||||||
  exit $EXIT_FAILURE
 | 
					  exit $EXIT_FAILURE
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Run
 | 
					# Run
 | 
				
			||||||
curl -sS -L -o $TMP_CSV_FILE $CSV_URL
 | 
					curl -sS -L -o $TMP_CSV_FILE $CSV_URL
 | 
				
			||||||
if ! diff -q $RAW_CSV_FILE $TMP_CSV_FILE > /dev/null 2>&1; then
 | 
					if ! diff -q $RAW_CSV_FILE $TMP_CSV_FILE >/dev/null 2>&1; then
 | 
				
			||||||
  mv $TMP_CSV_FILE $RAW_CSV_FILE
 | 
					  mv $TMP_CSV_FILE $RAW_CSV_FILE
 | 
				
			||||||
  nkf -w $RAW_CSV_FILE > $CSV_FILE
 | 
					  nkf -w $RAW_CSV_FILE >$CSV_FILE
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
  rm $TMP_CSV_FILE
 | 
					  rm $TMP_CSV_FILE
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user