Small changes to build.sh
This commit is contained in:
		
							
								
								
									
										5
									
								
								build.sh
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								build.sh
									
									
									
									
									
								
							| @@ -5,19 +5,22 @@ echo "Version in plugin file: $VERSION" | |||||||
| echo "Generated file will be: $FILE" | echo "Generated file will be: $FILE" | ||||||
|  |  | ||||||
| if [ -e "$FILE" ]; then | if [ -e "$FILE" ]; then | ||||||
|  | 	echo | ||||||
| 	echo "File already exists." | 	echo "File already exists." | ||||||
| 	 | 	 | ||||||
| 	givenMD5=`xpath -q -e 'string(//PLUGIN/@packageMD5)' zabbix_agent.plg` | 	givenMD5=`xpath -q -e 'string(//PLUGIN/@packageMD5)' zabbix_agent.plg` | ||||||
| 	read currentMD5 _ < <(md5sum "$FILE") | 	read currentMD5 _ < <(md5sum "$FILE") | ||||||
| 	 | 	 | ||||||
| 	if [ "$givenMD5" = "$currentMD5" ]; then | 	if [ "$givenMD5" = "$currentMD5" ]; then | ||||||
| 		echo "MD5 value matches." | 		echo "MD5 value is OK." | ||||||
| 	else | 	else | ||||||
| 		echo "MD5 value does not match!" | 		echo "MD5 value does not match!" | ||||||
| 		echo "unraid_zabbix.plg: $givenMD5" | 		echo "unraid_zabbix.plg: $givenMD5" | ||||||
| 		echo "$FILE: $currentMD5" | 		echo "$FILE: $currentMD5" | ||||||
| 	fi | 	fi | ||||||
| 	 | 	 | ||||||
|  | 	echo | ||||||
|  | 	 | ||||||
| 	if [ "$1" != "--force" ]; then | 	if [ "$1" != "--force" ]; then | ||||||
| 		echo "Stopping now. Call '$0 --force' to force recreating the file." | 		echo "Stopping now. Call '$0 --force' to force recreating the file." | ||||||
| 		exit 1 | 		exit 1 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user