mirror of
https://github.com/zerwes/ansible-fqcn-converter.git
synced 2024-11-23 09:16:38 -06:00
24 lines
387 B
Bash
Executable File
24 lines
387 B
Bash
Executable File
#! /bin/bash
|
|
|
|
declare -i E=0
|
|
|
|
cd $(dirname $0)
|
|
|
|
cp example.yml example.yml.orig
|
|
|
|
./fqcn-fixer.py -c examplecfg.yml -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
|