base_role/overlay/Linux/usr/local/bin/bash_to_bash.bash
embed@git.macaw.me b50fd16591 first
2024-01-06 01:38:28 +00:00

10 lines
274 B
Bash
Executable File

#!/bin/sh
# -*- mode: sh; tab-width: 8; coding: utf-8-unix -*-
# filter
ROLE=base
# extra cleanups to bash from yaml_to_bash
sed -e '/\[/s@, @ @g' \
-e '/\[/s@\([^"]\)u"@\1"@g' -e "/\[/s@\([^']\)u'@\1'@g" \
-e 's@="*\[\(.*\)\]@=(\1)@' -e "s@='*\[\(.*\)\]@=(\1)@"