From 65c96296cbd76ffdcab9ff57064c705ded7635e7 Mon Sep 17 00:00:00 2001 From: Jerome Petazzoni Date: Sun, 4 Oct 2015 19:50:15 -0700 Subject: [PATCH] Add YAML fixup helper --- fixup-yaml.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 fixup-yaml.sh diff --git a/fixup-yaml.sh b/fixup-yaml.sh new file mode 100644 index 00000000..ac4a7915 --- /dev/null +++ b/fixup-yaml.sh @@ -0,0 +1,16 @@ +#!/bin/sh +# Some tools will choke on the YAML files generated by PyYAML; +# in particular on a section like this one: +# +# service: +# ports: +# - 8000:5000 +# +# This script adds two spaces in front of the dash in those files. +# Warning: it is a hack, and probably won't work on some YAML files. +[ -f "$COMPOSE_FILE" ] || { + echo "Cannot find COMPOSE_FILE" + exit 1 +} +sed -i 's/^ -/ -/' $COMPOSE_FILE +