diff --git a/bash/ostree b/bash/ostree index edef6cff..218e4254 100644 --- a/bash/ostree +++ b/bash/ostree @@ -180,503 +180,6 @@ _ostree_ostree() { return 0 } -_ostree_admin_cleanup() { - local boolean_options=" - $main_boolean_options - " - - local options_with_args=" - --sysroot - " - - local options_with_args_glob=$( __ostree_to_extglob "$options_with_args" ) - - case "$prev" in - --sysroot) - __ostree_compreply_dirs_only - return 0 - ;; - $options_with_args_glob ) - return 0 - ;; - esac - - case "$cur" in - -*) - local all_options="$boolean_options $options_with_args" - __ostree_compreply_all_options - ;; - esac - - return 0 -} - -_ostree_admin_config_diff() { - local boolean_options=" - $main_boolean_options - " - - local options_with_args=" - --os - --sysroot - " - - local options_with_args_glob=$( __ostree_to_extglob "$options_with_args" ) - - case "$prev" in - --os) - __ostree_compreply_oses - return 0 - ;; - --sysroot) - __ostree_compreply_dirs_only - return 0 - ;; - $options_with_args_glob ) - return 0 - ;; - esac - - case "$cur" in - -*) - local all_options="$boolean_options $options_with_args" - __ostree_compreply_all_options - ;; - esac - - return 0 -} - -_ostree_admin_deploy() { - local boolean_options=" - $main_boolean_options - --retain - --retain-pending - --retain-rollback - --not-as-default - --karg-proc-cmdline - " - - local options_with_args=" - --karg - --karg-append - --origin-file - --os - --sysroot - " - - local options_with_args_glob=$( __ostree_to_extglob "$options_with_args" ) - - case "$prev" in - --origin-file) - __ostree_compreply_all_files - return 0 - ;; - --os) - __ostree_compreply_oses - return 0 - ;; - --sysroot) - __ostree_compreply_dirs_only - return 0 - ;; - $options_with_args_glob ) - return 0 - ;; - esac - - case "$cur" in - -*) - local all_options="$boolean_options $options_with_args" - __ostree_compreply_all_options - ;; - esac - - return 0 -} - -_ostree_admin_init_fs() { - local boolean_options=" - $main_boolean_options - " - - local options_with_args=" - --sysroot - " - - local options_with_args_glob=$( __ostree_to_extglob "$options_with_args" ) - - case "$prev" in - --sysroot) - __ostree_compreply_dirs_only - return 0 - ;; - $options_with_args_glob ) - return 0 - ;; - esac - - case "$cur" in - -*) - local all_options="$boolean_options $options_with_args" - __ostree_compreply_all_options - ;; - esac - - return 0 -} - -_ostree_admin_instutil() { - local boolean_options=" - $main_boolean_options - " - - local options_with_args=" - --sysroot - " - - local options_with_args_glob=$( __ostree_to_extglob "$options_with_args" ) - - case "$prev" in - --sysroot) - __ostree_compreply_dirs_only - return 0 - ;; - $options_with_args_glob ) - return 0 - ;; - esac - - case "$cur" in - -*) - local all_options="$boolean_options $options_with_args" - __ostree_compreply_all_options - ;; - *) - local argpos=$( __ostree_pos_first_nonflag $( __ostree_to_alternatives "$options_with_args" ) ) - if [ $cword -eq $argpos ]; then - local instutil_commands=" - grub2-generate - selinux-ensure-labeled - set-kargs - " - COMPREPLY=( $( compgen -W "$instutil_commands" -- "$cur" ) ) - fi - ;; - esac - - return 0 -} - -_ostree_admin_os_init() { - local boolean_options=" - $main_boolean_options - " - - local options_with_args=" - --sysroot - " - - local options_with_args_glob=$( __ostree_to_extglob "$options_with_args" ) - - case "$prev" in - --sysroot) - __ostree_compreply_dirs_only - return 0 - ;; - $options_with_args_glob ) - return 0 - ;; - esac - - case "$cur" in - -*) - local all_options="$boolean_options $options_with_args" - __ostree_compreply_all_options - ;; - esac - - return 0 -} - -_ostree_admin_pin() { - local boolean_options=" - $main_boolean_options - " - - local options_with_args=" - --sysroot - " - - local options_with_args_glob=$( __ostree_to_extglob "$options_with_args" ) - - case "$prev" in - --sysroot) - __ostree_compreply_dirs_only - return 0 - ;; - $options_with_args_glob ) - return 0 - ;; - esac - - case "$cur" in - -*) - local all_options="$boolean_options $options_with_args" - __ostree_compreply_all_options - ;; - esac - - return 0 -} - -_ostree_admin_set_origin() { - local boolean_options=" - $main_boolean_options - " - - local options_with_args=" - --index - --set -s - --sysroot - " - - local options_with_args_glob=$( __ostree_to_extglob "$options_with_args" ) - - case "$prev" in - --sysroot) - __ostree_compreply_dirs_only - return 0 - ;; - $options_with_args_glob ) - return 0 - ;; - esac - - case "$cur" in - -*) - local all_options="$boolean_options $options_with_args" - __ostree_compreply_all_options - ;; - *) - local argpos=$( __ostree_pos_first_nonflag $( __ostree_to_alternatives "$options_with_args" ) ) - if [ $cword -eq $argpos ]; then - __ostree_compreply_remotes - fi - ;; - esac - - return 0 -} - -_ostree_admin_status() { - local boolean_options=" - $main_boolean_options - " - - local options_with_args=" - --sysroot - " - - local options_with_args_glob=$( __ostree_to_extglob "$options_with_args" ) - - case "$prev" in - --sysroot) - __ostree_compreply_dirs_only - return 0 - ;; - $options_with_args_glob ) - return 0 - ;; - esac - - case "$cur" in - -*) - local all_options="$boolean_options $options_with_args" - __ostree_compreply_all_options - ;; - esac - - return 0 -} - -_ostree_admin_switch() { - local boolean_options=" - $main_boolean_options - " - - local options_with_args=" - --os - --reboot -r - --sysroot - " - - local options_with_args_glob=$( __ostree_to_extglob "$options_with_args" ) - - case "$prev" in - --os) - __ostree_compreply_oses - return 0 - ;; - --sysroot) - __ostree_compreply_dirs_only - return 0 - ;; - $options_with_args_glob ) - return 0 - ;; - esac - - case "$cur" in - -*) - local all_options="$boolean_options $options_with_args" - __ostree_compreply_all_options - ;; - *) - local argpos=$( __ostree_pos_first_nonflag $( __ostree_to_alternatives "$options_with_args" ) ) - - if [ $cword -eq $argpos ]; then - __ostree_compreply_refs - fi - esac - - return 0 -} - -_ostree_admin_undeploy() { - local boolean_options=" - $main_boolean_options - " - - local options_with_args=" - --sysroot - " - - local options_with_args_glob=$( __ostree_to_extglob "$options_with_args" ) - - case "$prev" in - --sysroot) - __ostree_compreply_dirs_only - return 0 - ;; - $options_with_args_glob ) - return 0 - ;; - esac - - case "$cur" in - -*) - local all_options="$boolean_options $options_with_args" - __ostree_compreply_all_options - ;; - esac - - return 0 -} - -_ostree_admin_unlock() { - local boolean_options=" - $main_boolean_options - --hotfix - " - - local options_with_args=" - --sysroot - " - - local options_with_args_glob=$( __ostree_to_extglob "$options_with_args" ) - - case "$prev" in - --sysroot) - __ostree_compreply_dirs_only - return 0 - ;; - $options_with_args_glob ) - return 0 - ;; - esac - - case "$cur" in - -*) - local all_options="$boolean_options $options_with_args" - __ostree_compreply_all_options - ;; - esac - - return 0 -} - -_ostree_admin_upgrade() { - local boolean_options=" - $main_boolean_options - --allow-downgrade - --deploy-only - --pull-only - --reboot -r - " - - local options_with_args=" - --os - --override-commit - --sysroot - " - - local options_with_args_glob=$( __ostree_to_extglob "$options_with_args" ) - - case "$prev" in - --override-commit) - __ostree_compreply_commits - return 0 - ;; - --sysroot) - __ostree_compreply_dirs_only - return 0 - ;; - $options_with_args_glob ) - return 0 - ;; - esac - - case "$cur" in - -*) - local all_options="$boolean_options $options_with_args" - __ostree_compreply_all_options - ;; - esac - - return 0 -} - -_ostree_admin() { - local subcommands=" - cleanup - config-diff - deploy - init-fs - instutil - os-init - set-origin - status - switch - undeploy - unlock - upgrade - " - - __ostree_subcommands "$subcommands" && return 0 - - case "$cur" in - -*) - COMPREPLY=( $( compgen -W "$main_boolean_options" -- "$cur" ) ) - ;; - *) - COMPREPLY=( $( compgen -W "$subcommands" -- "$cur" ) ) - ;; - esac - - return 0 -} - _ostree_cat() { local boolean_options=" $main_boolean_options diff --git a/src/ostree/ot-admin-builtin-cleanup.c b/src/ostree/ot-admin-builtin-cleanup.c index 4028931e..a4753030 100644 --- a/src/ostree/ot-admin-builtin-cleanup.c +++ b/src/ostree/ot-admin-builtin-cleanup.c @@ -30,11 +30,6 @@ #include -/* ATTENTION: - * Please remember to update the bash-completion script (bash/ostree) and - * man page (man/ostree-admin-cleanup.xml) when changing the option list. - */ - static GOptionEntry options[] = { { NULL } }; diff --git a/src/ostree/ot-admin-builtin-deploy.c b/src/ostree/ot-admin-builtin-deploy.c index ee7f3ccf..d9905212 100644 --- a/src/ostree/ot-admin-builtin-deploy.c +++ b/src/ostree/ot-admin-builtin-deploy.c @@ -45,11 +45,6 @@ static char *opt_osname; static char *opt_origin_path; static gboolean opt_kernel_arg_none; -/* ATTENTION: - * Please remember to update the bash-completion script (bash/ostree) and - * man page (man/ostree-admin-deploy.xml) when changing the option list. - */ - static GOptionEntry options[] = { { "os", 0, 0, G_OPTION_ARG_STRING, &opt_osname, "Use a different operating system root than the current one", "OSNAME" }, { "origin-file", 0, 0, G_OPTION_ARG_FILENAME, &opt_origin_path, "Specify origin file", "FILENAME" }, diff --git a/src/ostree/ot-admin-builtin-diff.c b/src/ostree/ot-admin-builtin-diff.c index 6a44a72b..27855881 100644 --- a/src/ostree/ot-admin-builtin-diff.c +++ b/src/ostree/ot-admin-builtin-diff.c @@ -32,11 +32,6 @@ static char *opt_osname; -/* ATTENTION: - * Please remember to update the bash-completion script (bash/ostree) and - * man page (man/ostree-admin-config-diff.xml) when changing the option list. - */ - static GOptionEntry options[] = { { "os", 0, 0, G_OPTION_ARG_STRING, &opt_osname, "Use a different operating system root than the current one", "OSNAME" }, { NULL } diff --git a/src/ostree/ot-admin-builtin-init-fs.c b/src/ostree/ot-admin-builtin-init-fs.c index 70348402..cca63a62 100644 --- a/src/ostree/ot-admin-builtin-init-fs.c +++ b/src/ostree/ot-admin-builtin-init-fs.c @@ -30,11 +30,6 @@ #include -/* ATTENTION: - * Please remember to update the bash-completion script (bash/ostree) and - * man page (man/ostree-admin-init-fs.xml) when changing the option list. - */ - static GOptionEntry options[] = { { NULL } }; diff --git a/src/ostree/ot-admin-builtin-os-init.c b/src/ostree/ot-admin-builtin-os-init.c index 411e415e..203f297b 100644 --- a/src/ostree/ot-admin-builtin-os-init.c +++ b/src/ostree/ot-admin-builtin-os-init.c @@ -30,11 +30,6 @@ #include -/* ATTENTION: - * Please remember to update the bash-completion script (bash/ostree) and - * man page (man/ostree-admin-os-init.xml) when changing the option list. - */ - static GOptionEntry options[] = { { NULL } }; diff --git a/src/ostree/ot-admin-builtin-pin.c b/src/ostree/ot-admin-builtin-pin.c index e26ea926..f110983b 100644 --- a/src/ostree/ot-admin-builtin-pin.c +++ b/src/ostree/ot-admin-builtin-pin.c @@ -29,11 +29,6 @@ #include "ostree.h" #include "otutil.h" -/* ATTENTION: - * Please remember to update the bash-completion script (bash/ostree) and - * man page (man/ostree-admin-pin.xml) when changing the option list. - */ - static gboolean opt_unpin; static GOptionEntry options[] = { diff --git a/src/ostree/ot-admin-builtin-set-origin.c b/src/ostree/ot-admin-builtin-set-origin.c index 77f14bf5..07453a87 100644 --- a/src/ostree/ot-admin-builtin-set-origin.c +++ b/src/ostree/ot-admin-builtin-set-origin.c @@ -35,11 +35,6 @@ static int opt_index = -1; static char **opt_set; -/* ATTENTION: - * Please remember to update the bash-completion script (bash/ostree) and - * man page (man/ostree-admin-set-origin.xml) when changing the option list. - */ - static GOptionEntry options[] = { { "set", 's', 0, G_OPTION_ARG_STRING_ARRAY, &opt_set, "Set config option KEY=VALUE for remote", "KEY=VALUE" }, { "index", 0, 0, G_OPTION_ARG_INT, &opt_index, "Operate on the deployment INDEX, starting from zero", "INDEX" }, diff --git a/src/ostree/ot-admin-builtin-status.c b/src/ostree/ot-admin-builtin-status.c index 02991309..a2e24ef3 100644 --- a/src/ostree/ot-admin-builtin-status.c +++ b/src/ostree/ot-admin-builtin-status.c @@ -30,11 +30,6 @@ #include -/* ATTENTION: - * Please remember to update the bash-completion script (bash/ostree) and - * man page (man/ostree-admin-status.xml) when changing the option list. - */ - static GOptionEntry options[] = { { NULL } }; diff --git a/src/ostree/ot-admin-builtin-switch.c b/src/ostree/ot-admin-builtin-switch.c index 7609b25a..2f12ef1d 100644 --- a/src/ostree/ot-admin-builtin-switch.c +++ b/src/ostree/ot-admin-builtin-switch.c @@ -34,11 +34,6 @@ static gboolean opt_reboot; static char *opt_osname; -/* ATTENTION: - * Please remember to update the bash-completion script (bash/ostree) and - * man page (man/ostree-admin-switch.xml) when changing the option list. - */ - static GOptionEntry options[] = { { "reboot", 'r', 0, G_OPTION_ARG_NONE, &opt_reboot, "Reboot after switching trees", NULL }, { "os", 0, 0, G_OPTION_ARG_STRING, &opt_osname, "Use a different operating system root than the current one", "OSNAME" }, diff --git a/src/ostree/ot-admin-builtin-undeploy.c b/src/ostree/ot-admin-builtin-undeploy.c index 6f070524..0a50dc0d 100644 --- a/src/ostree/ot-admin-builtin-undeploy.c +++ b/src/ostree/ot-admin-builtin-undeploy.c @@ -29,11 +29,6 @@ #include "ostree.h" #include "otutil.h" -/* ATTENTION: - * Please remember to update the bash-completion script (bash/ostree) and - * man page (man/ostree-admin-undeploy.xml) when changing the option list. - */ - static GOptionEntry options[] = { { NULL } }; diff --git a/src/ostree/ot-admin-builtin-unlock.c b/src/ostree/ot-admin-builtin-unlock.c index 34ff08cd..f0efa44a 100644 --- a/src/ostree/ot-admin-builtin-unlock.c +++ b/src/ostree/ot-admin-builtin-unlock.c @@ -34,11 +34,6 @@ static gboolean opt_hotfix; -/* ATTENTION: - * Please remember to update the bash-completion script (bash/ostree) and - * man page (man/ostree-admin-unlock.xml) when changing the option list. - */ - static GOptionEntry options[] = { { "hotfix", 0, 0, G_OPTION_ARG_NONE, &opt_hotfix, "Retain changes across reboots", NULL }, { NULL } diff --git a/src/ostree/ot-admin-builtin-upgrade.c b/src/ostree/ot-admin-builtin-upgrade.c index 1b6a0253..eafe8bce 100644 --- a/src/ostree/ot-admin-builtin-upgrade.c +++ b/src/ostree/ot-admin-builtin-upgrade.c @@ -40,11 +40,6 @@ static gboolean opt_deploy_only; static char *opt_osname; static char *opt_override_commit; -/* ATTENTION: - * Please remember to update the bash-completion script (bash/ostree) and - * man page (man/ostree-admin-upgrade.xml) when changing the option list. - */ - static GOptionEntry options[] = { { "os", 0, 0, G_OPTION_ARG_STRING, &opt_osname, "Use a different operating system root than the current one", "OSNAME" }, { "reboot", 'r', 0, G_OPTION_ARG_NONE, &opt_reboot, "Reboot after a successful upgrade", NULL }, diff --git a/src/ostree/ot-admin-instutil-builtin-grub2-generate.c b/src/ostree/ot-admin-instutil-builtin-grub2-generate.c index df9d804b..3ab5c245 100644 --- a/src/ostree/ot-admin-instutil-builtin-grub2-generate.c +++ b/src/ostree/ot-admin-instutil-builtin-grub2-generate.c @@ -28,11 +28,6 @@ #include "otutil.h" -/* ATTENTION: - * Please remember to update the bash-completion script (bash/ostree) and - * man page (man/ostree-admin-instutil.xml) when changing the option list. - */ - static GOptionEntry options[] = { { NULL } }; diff --git a/src/ostree/ot-admin-instutil-builtin-selinux-ensure-labeled.c b/src/ostree/ot-admin-instutil-builtin-selinux-ensure-labeled.c index 3b546711..8bf75b31 100644 --- a/src/ostree/ot-admin-instutil-builtin-selinux-ensure-labeled.c +++ b/src/ostree/ot-admin-instutil-builtin-selinux-ensure-labeled.c @@ -173,11 +173,6 @@ selinux_relabel_dir (OstreeSePolicy *sepolicy, return ret; } -/* ATTENTION: - * Please remember to update the bash-completion script (bash/ostree) and - * man page (man/ostree-admin-instutil.xml) when changing the option list. - */ - static GOptionEntry options[] = { { NULL } }; diff --git a/src/ostree/ot-admin-instutil-builtin-set-kargs.c b/src/ostree/ot-admin-instutil-builtin-set-kargs.c index 1194f82d..666e5369 100644 --- a/src/ostree/ot-admin-instutil-builtin-set-kargs.c +++ b/src/ostree/ot-admin-instutil-builtin-set-kargs.c @@ -34,11 +34,6 @@ static gboolean opt_merge; static char **opt_replace; static char **opt_append; -/* ATTENTION: - * Please remember to update the bash-completion script (bash/ostree) and - * man page (man/ostree-admin-instutil.xml) when changing the option list. - */ - static GOptionEntry options[] = { { "import-proc-cmdline", 0, 0, G_OPTION_ARG_NONE, &opt_proc_cmdline, "Import current /proc/cmdline", NULL }, { "merge", 0, 0, G_OPTION_ARG_NONE, &opt_merge, "Merge with previous command line", NULL },