On Thu, 24 Sep 2020 01:18:11 +0200 Denis 'GNUtoo' Carikli <[email protected]> wrote:
> +++ b/images/gen_key_migration_script/generate_shell_commands.py
[...]
> + variable_name = '{}{}_{}_{}_cert_key'.format(
> + cert_data['generation'],
> + get_release_string(cert_data['release']),
> + escape_package_name(package_name),
Some more escaping needs to be done here as otherwise hyphens(-) can
end up in variable names which the shell don't allow.
> +def generate_sed_commands(package_name, certs_data_array,
> key_format):
> + output_string += 'sed \\{}'.format(os.linesep)
> + output_string += '\t"s/{}/{}/g" \\{}'.format(old_variable,
> + new_variable,
> + os.linesep)
The slash(/) needs to be replaced by a hash(#) as the former is part of
the base64 encoding alphabet whereas the later is not and works with
sed too.
I'll send a proper v2 once I'll have tested this patchset more
extensively.
Denis.
pgphbY589QRJP.pgp
Description: OpenPGP digital signature
_______________________________________________ Replicant mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/replicant
