mirror of
				https://github.com/zerwes/ansible-fqcn-converter.git
				synced 2025-02-25 18:55:30 -06:00 
			
		
		
		
	
		
			
				
	
	
		
			24 lines
		
	
	
		
			369 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			369 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #! /bin/bash
 | |
| 
 | |
| declare -i E=0
 | |
| 
 | |
| cd $(dirname $0)
 | |
| 
 | |
| cp example.yml example.yml.orig
 | |
| 
 | |
| ./fqcn-fixer.py -f example.yml -w -x
 | |
| 
 | |
| cmp example.yml exampleconverted.yml
 | |
| E=$?
 | |
| 
 | |
| if [ $E -gt 0 ]; then
 | |
| 	diff -Naur example.yml exampleconverted.yml
 | |
| 	echo -e "\n\tERROR: conversion not as expected\n"
 | |
| else
 | |
| 	echo -e "\n\tconversion successful\n"
 | |
| fi
 | |
| 
 | |
| mv example.yml.orig example.yml
 | |
| 
 | |
| exit $E
 |