diff --git a/UPGRADE.rst b/UPGRADE.rst index 13ff930..2143b56 100644 --- a/UPGRADE.rst +++ b/UPGRADE.rst @@ -12,28 +12,14 @@ From v0.2.0 to unreleased All inventory variables have been renamed so you might need to update your inventory. -This oneliner can come in handy to do this: - -.. code:: shell - - git ls-files -z | xargs --null -I '{}' find '{}' -type f -print0 \ - | xargs --null sed --in-place --regexp-extended ' - s/owncloud__?run_occ_global_commands/owncloud__occ_cmd_list/g; - s/owncloud__?run_occ_group_commands/owncloud__group_occ_cmd_list/g; - s/owncloud__?run_occ_host_commands/owncloud__host_occ_cmd_list/g; - s/owncloud__?packages_recommended/owncloud__packages_recommended/g; - s/owncloud__?packages_optional/owncloud__optional_packages/g; - s/owncloud__?packages_group/owncloud__group_packages/g; - s/owncloud__?packages_host/owncloud__host_packages/g; - s/owncloud__?config_group/owncloud__group_config/g; - s/owncloud__?config_host/owncloud__host_config/g; - s/owncloud__?apps_config_group/owncloud__group_apps_config/g; - s/owncloud__?apps_config_host/owncloud__host_apps_config/g; - s/owncloud__?config_role_required/owncloud__role_config/g; - s/owncloud__?config_role_optional/owncloud__role_recommended_config/g; - s/owncloud__?ldap_enable([^d])/owncloud__ldap_enabled\1/g; - s/\<([^.]owncloud)_([^_])/\1__\2/g; - ' +This script can come in handy to do this: + +.. literalinclude:: scripts/upgrade-from-v0.2.X-to-v0.3.X + :language: shell + +The script is bundled with this role under +:file:`docs/scripts/upgrade-from-v0.2.X-to-v0.3.X` and can be invoked from +their. From v0.1.0 to v0.2.0 --------------------- diff --git a/docs/scripts/upgrade-from-v0.2.X-to-v0.3.X b/docs/scripts/upgrade-from-v0.2.X-to-v0.3.X new file mode 100755 index 0000000..0cafdb2 --- /dev/null +++ b/docs/scripts/upgrade-from-v0.2.X-to-v0.3.X @@ -0,0 +1,22 @@ +#!/bin/bash +## Upgrade inventory variables for migration from debops.owncloud v0.2.X to v0.3.X. +## The script is idempotent. + +git ls-files -z | xargs --null -I '{}' find '{}' -type f -print0 \ + | xargs --null sed --in-place --regexp-extended ' + s/owncloud__?run_occ_global_commands/owncloud__occ_cmd_list/g; + s/owncloud__?run_occ_group_commands/owncloud__group_occ_cmd_list/g; + s/owncloud__?run_occ_host_commands/owncloud__host_occ_cmd_list/g; + s/owncloud__?packages_recommended/owncloud__packages_recommended/g; + s/owncloud__?packages_optional/owncloud__optional_packages/g; + s/owncloud__?packages_group/owncloud__group_packages/g; + s/owncloud__?packages_host/owncloud__host_packages/g; + s/owncloud__?config_group/owncloud__group_config/g; + s/owncloud__?config_host/owncloud__host_config/g; + s/owncloud__?apps_config_group/owncloud__group_apps_config/g; + s/owncloud__?apps_config_host/owncloud__host_apps_config/g; + s/owncloud__?config_role_required/owncloud__role_config/g; + s/owncloud__?config_role_optional/owncloud__role_recommended_config/g; + s/owncloud__?ldap_enable([^d])/owncloud__ldap_enabled\1/g; + s/\<([^.]owncloud)_([^_])/\1__\2/g; + '